Conversation with Merlin [email protected] · Mon Nov 13 2023

itext kernel pdf pdfdocument c# says cannot open document

The error message "cannot open document" in the context of using iText kernel for PDF document manipulation in C# could potentially indicate a problem with accessing the PDF file. This error can occur due to various reasons such as an incorrect file path, a missing or corrupted PDF viewer, or an incompatible PDF format. To address this issue, you could take the following steps:

  1. Check the File Path: Ensure that the file path specified in your code to access the PDF document is accurate and that the file exists at the specified location.

  2. Verify PDF Viewer: Confirm that the PDF viewer being used supports the PDF format and is not corrupted. If necessary, try opening the PDF document in a different PDF viewer to see if the issue persists.

  3. File Format Compatibility: Check whether the PDF file is in a compatible format for processing with iText kernel in C#. Some PDF features or formats may not be fully supported by certain libraries.

If the error persists, consider reaching out to the PDF viewer vendor or iText support for further assistance in resolving the issue with opening the document. Additionally, reviewing the code for potential issues related to file path handling and PDF format compatibility may provide insights into resolving the "cannot open document" error.

In our previous post, we talked about iTextPdf API for working with PDF files using C#/VB.NET in .NET applications. The API lets you create, edit and manipulate PDF documents without going into any internal file format details of PDF file format. Using iTextPdf is easy to work with and with just a few lines of code, you can start creating, reading, and manipulating PDF files.In this article, we will talk about using iTextPdf in .NET application to create, read, and save PDF files programmatically in our C# application. So, lets get started and have a look at how we can create a PDF in C#.iTextPdf InstallationYou can install iTextPdf API either from NuGet or from iText Artifactory Server. Before you can create your C# application for using the iTextPdf API, you need to install it from either of these sources. You can refer to the instructions article for installing iTextPdf API for setting up your console application for this purpose.Overview of Main iTextPdf API ClassesSome of the main iTextPdf classes are as follows.PdfDocumentEvery PDF document created with iTextPdf is initiated using an object of the PdfDocument class.PdfWriterPdfWriter class is responsible for writing the PDF content to a destination, such as a file or a stream. It provides the functionality to create a PDF document and specify the output destination. Some key features and responsibilities of PdfWriter class are as follows.Destination ConfigurationThe PdfWriter constructor allows you to specify the output destination for the PDF content. It can accept parameters like a file path, a Stream object, or an instance of IOutputStreamCounter. This determines where the PDF content will be written.PDF Document CreationWhen you create a new instance of PdfWriter, it automatically creates a new PdfDocument object associated with it. The PdfDocument represents the logical structure of a PDF file and provides methods to manipulate its content.PDF Compression and Version ControlThe PdfWriter class allows you to configure various aspects of the PDF file, such as compression settings and PDF version compatibility.Writing PDF ContentOnce you have a PdfWriter instance, you can use it to write content to the associated PdfDocument. You can add pages, create annotations, add text, images, and other graphical elements to the PDF document using the provided methods.Closing the WriterAfter you finish writing the PDF content, its important to close the PdfWriter to ensure the document is finalized and any necessary resources are released.ParagraphThe Paragraph class represents a paragraph of text in a PDF document. It is used to add textual content to a PDF document. Here are some key features and responsibilities of the Paragraph class:Text ContentThe primary purpose of the Paragraph class is to hold and display textual content within a PDF document. You can pass a string or any other text representation to the Paragraph constructor to initialize its content.Text FormattingThe Paragraph class allows you to apply various formatting options to the text, such as font size, font family, text color, bold, italic, underline, and more. You can use methods like SetFontSize(), SetFont(), SetBold(), SetItalic(), SetUnderline(), etc., to specify the desired formatting.Alignment and IndentationThe Paragraph class provides methods to set the alignment of the text within the paragraph. You can align the text to the left, right, or center, or justify it. Additionally, you can apply indentation to control the left and right margins of the paragraph.Inline ElementsApart from plain text, you can also add inline elements within a Paragraph. For example, you can include phrases or words with different formatting styles, add hyperlinks, insert images, or include other elements supported by iText.NestingYou can nest multiple paragraphs within each other or combine them with other iText elements like tables, lists, or chunks to create complex document structures.Integration with DocumentThe Paragraph

blog.fileformat.com

Protect and Secure Keep your data safe Ensuring that your data is secure and protected is important. Although sharing PDF documents is easy, there are also simple ways to keep the data inside safe.Using passwords to share information with authorized users or editors, redaction to remove sensitive information to remain compliant with necessary regulations, digital signatures to make binding agreements simple and secure and more. iText offers many ways to customize the security features on your documents-many of which arebuilt into our open-sourceiText Core offering. Interested in learning more about how to secure PDF documents? Watch our recorded webinar below. Security options How iText can help There are some great, simple ways to protect and secure your datawith iText.Choose one for simple security, or a combination to meet your needs. We offer PDFProtector,a FREE online tool to evaluatehow iText can help add protection toyour workflow. Passwords Password protection allows you to share authorization for a document with people you trust. The document will be encrypted, and then can be decrypted with the correct password. Encryption Encryption encodes the data in your document, so that any unauthorized users that open it will not be able to read the document without decoding it-usually through a Public/Private key pair or password. Digital Signatures Digital signatures combine a few levels of security using both a public key and a hash to identify that this is the correct document, and that ithas not been altered. Learn more about Digital Signatures on our solutions page. Redaction with pdfSweep Remove sensitive information from a document, while still keeping the public information available for archives. This is often used for personal identification numbers, names, dates and information such as health or financial details.Our pdfSweep add-on for iText Core allows you to remove these types of information from documents to remain compliant with regulations such as GDPR or CCPA without removing all of your archives. Adding a password to a PDF with iText Core Below is a quick example where you can see the code to add a password to an existing PDF. Click Upload File and make sure the file name of the PDF you upload matches the name you specifyin private static final String ORIG. You can then choose the type of password you want to set by specifying it inprivate static final byte[] USERPASS orprivate static final byte[] OWNERPASS. You can set both types of password if you wish. Then clickExecuteto run your code. To remove an uploaded file, click thexdisplayed next to the file name. import com.itextpdf.kernel.pdf.EncryptionConstants; import com.itextpdf.kernel.pdf.PdfDocument; import com.itextpdf.kernel.pdf.PdfReader; import com.itextpdf.kernel.pdf.PdfWriter; import com.itextpdf.kernel.pdf.WriterProperties; import java.io.FileOutputStream; import java.io.IOException; public class PDFProtection { private static final String ORIG = "/uploads/protect.pdf"; private static final String OUTPUT_FOLDER = "/myfiles/"; private static final byte[] USERPASS = "user".getBytes(); private static final byte[] OWNERPASS = "owner".getBytes(); public static void main(String[] args) throws IOException { PdfReader pdfReader = new PdfReader(ORIG); WriterProperties writerProperties = new WriterProperties(); writerProperties.setStandardEncryption(USERPASS, OWNERPASS, EncryptionConstants.ALLOW_PRINTING, EncryptionConstants.ENCRYPTION_AES_128); PdfWriter pdfWriter = new PdfWriter(new FileOutputStream(OUTPUT_FOLDER + "Protected.pdf"), writerProperties); PdfDocument pdfDocument = new PdfDocument(pdfReader, pdfWriter); pdfDocument.close(); } } using System.IO; using iText.Kernel.Pdf; namespace PDFProtection { public class PDFProtection { private static string ORIG = "/uploads/protect.pdf"; private static string OUTPUT_FOLDER = "/myfiles/"; private static byte[] USERPASS = System.Text.Encoding.Default.GetBytes("user"); private static byte[] OWNERPASS = System

itextpdf.com

Intro iText Core iText Core version 8 is the latest version of our innovative PDF library - to program PDF documents in Java or .NET (C#). iText is a more versatile, programmable and enterprise-grade PDF solution that allows you to embed its functionalities within your own software for digital transformation. iText Core is available under open source (AGPL) as well as a commercial license. iText SDK available on AWS iText is now available on the AWS Marketplace. iText Suite BYOL offers a wide range of common PDF tasks for developers to use at their utmost convenience using the REST API. Discover more How it works To demonstrate the powerful high-level capabilities of the iText Core library,hereis a simple "Hello World!" example showing how to createa PDFinjust a few lines of Java or C#: import com.itextpdf.kernel.pdf.*; import com.itextpdf.layout.Document; import com.itextpdf.layout.element.Paragraph; import java.io.*; public class HelloWorld { public static final String DEST = "/myfiles/hello.pdf"; public static void main(String args[]) throws IOException { PdfDocument pdf = new PdfDocument(new PdfWriter(DEST)); Document document = new Document(pdf); String line = "Hello! Welcome to iTextPdf"; document.add(new Paragraph(line)); document.close(); System.out.println("Awesome PDF just got created."); } } using System; using System.IO; using iText.Kernel.Pdf; using iText.Layout; using iText.Layout.Element; class Program { static void Main() { PdfDocument pdfDocument = new PdfDocument(new PdfWriter(new FileStream("/myfiles/hello.pdf", FileMode.Create, FileAccess.Write))); Document document = new Document(pdfDocument); String line = "Hello! Welcome to iTextPdf"; document.Add(new Paragraph(line)); document.Close(); Console.WriteLine("Awesome PDF just got created."); } } Benefits Why use iText Core? With iText Core you don't have to worry about PDF technologies and standards,you can just focus on your business needsand document content. The high-level API provides easy methods to create, and manipulate PDF documents in all kinds of ways, such as splitting, merging, form filling, and much more. At the same timeyour developmentteam has full access to all internal PDF structures, with the low-level API offering them thepossibility to read, insert, update and delete any PDF object they want. In additionto this, they can benefit from ourrich and up-to-date technical documentation intheKnowledge Base. Focus on the high level, business logic High-level APIs allow you to keep focus on your business logic and document content as iText Core offers an abstract document model. Focus on the low level, with internal PDF structures The low-level APIs give full access to the internal PDF structures, which allowyou to read, insert, update and delete any PDF document. Meet Global PDF Standards PDF: PDF 1.x, PDF 1.7 (ISO 32000-1), PDF 2.0 (ISO 32000-2) from iText Core 7.1 on. Archiving: PDF/A-1, PDF/A-2, PDF/A-3, PDF/A-4 (ISO 19005-1, -2, -3, and -4, alllevels). Accessibility: PDF/UA (ISO 14289-1). Digital signatures: PAdES (ETSI EN 319 142 / ETSI TS 102 778). Interactive Forms: Fill, extractand flatten AcroForms andXFDF. Fill, extract and check for XFAfiles. Support for SVG. Key features Main Capabilities of iText Core iText Core is a straightforward,performant and extensible library that is ready to handle thechallenges of today's digital document workflows. Embed iText Corescode libraries in applications to create the typeof PDF files you want. Whether youre creatingbatches of files automatically to add to a digitalarchive or you want to set up a form campaign foryour customers, iText Core can help you get it right. Customizable & extensible The comprehensive Java and .NET (C#) PDF libraries haveboth out of the box functionality, for easy use,and the flexibility to extend and customize to meet your needs. iText Core focuses on easy integration and open standards. iText Core add-ons iText Core has a number of add-ons forspecific use cases you may en

itextpdf.com

any other way?

It seems like the provided information focuses more on the iTextPdf API and its features, but doesn't directly address the specific issue of "cannot open document" in the context of using iText kernel for PDF document manipulation in C#.

To troubleshoot the "cannot open document" issue, it is important to consider potential reasons for this error, such as incorrect file paths, PDF viewer compatibility, and PDF format issues.

Here are other ways to troubleshoot and resolve this issue:

  1. File Path: Double-check the file path used to access the PDF document in your code. Ensure that the file exists at the specified location and that the file path is correctly formatted.

  2. PDF Viewer: Verify the PDF viewer being used and ensure that it supports the PDF format. If possible, try opening the PDF document with a different PDF viewer to see if the issue persists.

  3. PDF Format: Confirm that the PDF file is in a compatible format for processing with the iText kernel in C#. Some PDF features or formats may not be fully supported by certain libraries.

  4. Error Handling: Implement proper error handling and logging in your code to capture specific error messages or exceptions that may provide more insight into the "cannot open document" issue.

By carefully examining these aspects, you may be able to identify the root cause of the problem and take appropriate corrective actions to resolve the. If the problem persists, consider reaching out to iText support or consulting relevant C# and PDF document manipulation communities for further assistance and insights.

In our previous post, we talked about iTextPdf API for working with PDF files using C#/VB.NET in .NET applications. The API lets you create, edit and manipulate PDF documents without going into any internal file format details of PDF file format. Using iTextPdf is easy to work with and with just a few lines of code, you can start creating, reading, and manipulating PDF files.In this article, we will talk about using iTextPdf in .NET application to create, read, and save PDF files programmatically in our C# application. So, lets get started and have a look at how we can create a PDF in C#.iTextPdf InstallationYou can install iTextPdf API either from NuGet or from iText Artifactory Server. Before you can create your C# application for using the iTextPdf API, you need to install it from either of these sources. You can refer to the instructions article for installing iTextPdf API for setting up your console application for this purpose.Overview of Main iTextPdf API ClassesSome of the main iTextPdf classes are as follows.PdfDocumentEvery PDF document created with iTextPdf is initiated using an object of the PdfDocument class.PdfWriterPdfWriter class is responsible for writing the PDF content to a destination, such as a file or a stream. It provides the functionality to create a PDF document and specify the output destination. Some key features and responsibilities of PdfWriter class are as follows.Destination ConfigurationThe PdfWriter constructor allows you to specify the output destination for the PDF content. It can accept parameters like a file path, a Stream object, or an instance of IOutputStreamCounter. This determines where the PDF content will be written.PDF Document CreationWhen you create a new instance of PdfWriter, it automatically creates a new PdfDocument object associated with it. The PdfDocument represents the logical structure of a PDF file and provides methods to manipulate its content.PDF Compression and Version ControlThe PdfWriter class allows you to configure various aspects of the PDF file, such as compression settings and PDF version compatibility.Writing PDF ContentOnce you have a PdfWriter instance, you can use it to write content to the associated PdfDocument. You can add pages, create annotations, add text, images, and other graphical elements to the PDF document using the provided methods.Closing the WriterAfter you finish writing the PDF content, its important to close the PdfWriter to ensure the document is finalized and any necessary resources are released.ParagraphThe Paragraph class represents a paragraph of text in a PDF document. It is used to add textual content to a PDF document. Here are some key features and responsibilities of the Paragraph class:Text ContentThe primary purpose of the Paragraph class is to hold and display textual content within a PDF document. You can pass a string or any other text representation to the Paragraph constructor to initialize its content.Text FormattingThe Paragraph class allows you to apply various formatting options to the text, such as font size, font family, text color, bold, italic, underline, and more. You can use methods like SetFontSize(), SetFont(), SetBold(), SetItalic(), SetUnderline(), etc., to specify the desired formatting.Alignment and IndentationThe Paragraph class provides methods to set the alignment of the text within the paragraph. You can align the text to the left, right, or center, or justify it. Additionally, you can apply indentation to control the left and right margins of the paragraph.Inline ElementsApart from plain text, you can also add inline elements within a Paragraph. For example, you can include phrases or words with different formatting styles, add hyperlinks, insert images, or include other elements supported by iText.NestingYou can nest multiple paragraphs within each other or combine them with other iText elements like tables, lists, or chunks to create complex document structures.Integration with DocumentThe Paragraph

blog.fileformat.com

Protect and Secure Keep your data safe Ensuring that your data is secure and protected is important. Although sharing PDF documents is easy, there are also simple ways to keep the data inside safe.Using passwords to share information with authorized users or editors, redaction to remove sensitive information to remain compliant with necessary regulations, digital signatures to make binding agreements simple and secure and more. iText offers many ways to customize the security features on your documents-many of which arebuilt into our open-sourceiText Core offering. Interested in learning more about how to secure PDF documents? Watch our recorded webinar below. Security options How iText can help There are some great, simple ways to protect and secure your datawith iText.Choose one for simple security, or a combination to meet your needs. We offer PDFProtector,a FREE online tool to evaluatehow iText can help add protection toyour workflow. Passwords Password protection allows you to share authorization for a document with people you trust. The document will be encrypted, and then can be decrypted with the correct password. Encryption Encryption encodes the data in your document, so that any unauthorized users that open it will not be able to read the document without decoding it-usually through a Public/Private key pair or password. Digital Signatures Digital signatures combine a few levels of security using both a public key and a hash to identify that this is the correct document, and that ithas not been altered. Learn more about Digital Signatures on our solutions page. Redaction with pdfSweep Remove sensitive information from a document, while still keeping the public information available for archives. This is often used for personal identification numbers, names, dates and information such as health or financial details.Our pdfSweep add-on for iText Core allows you to remove these types of information from documents to remain compliant with regulations such as GDPR or CCPA without removing all of your archives. Adding a password to a PDF with iText Core Below is a quick example where you can see the code to add a password to an existing PDF. Click Upload File and make sure the file name of the PDF you upload matches the name you specifyin private static final String ORIG. You can then choose the type of password you want to set by specifying it inprivate static final byte[] USERPASS orprivate static final byte[] OWNERPASS. You can set both types of password if you wish. Then clickExecuteto run your code. To remove an uploaded file, click thexdisplayed next to the file name. import com.itextpdf.kernel.pdf.EncryptionConstants; import com.itextpdf.kernel.pdf.PdfDocument; import com.itextpdf.kernel.pdf.PdfReader; import com.itextpdf.kernel.pdf.PdfWriter; import com.itextpdf.kernel.pdf.WriterProperties; import java.io.FileOutputStream; import java.io.IOException; public class PDFProtection { private static final String ORIG = "/uploads/protect.pdf"; private static final String OUTPUT_FOLDER = "/myfiles/"; private static final byte[] USERPASS = "user".getBytes(); private static final byte[] OWNERPASS = "owner".getBytes(); public static void main(String[] args) throws IOException { PdfReader pdfReader = new PdfReader(ORIG); WriterProperties writerProperties = new WriterProperties(); writerProperties.setStandardEncryption(USERPASS, OWNERPASS, EncryptionConstants.ALLOW_PRINTING, EncryptionConstants.ENCRYPTION_AES_128); PdfWriter pdfWriter = new PdfWriter(new FileOutputStream(OUTPUT_FOLDER + "Protected.pdf"), writerProperties); PdfDocument pdfDocument = new PdfDocument(pdfReader, pdfWriter); pdfDocument.close(); } } using System.IO; using iText.Kernel.Pdf; namespace PDFProtection { public class PDFProtection { private static string ORIG = "/uploads/protect.pdf"; private static string OUTPUT_FOLDER = "/myfiles/"; private static byte[] USERPASS = System.Text.Encoding.Default.GetBytes("user"); private static byte[] OWNERPASS = System

itextpdf.com

Intro iText Core iText Core version 8 is the latest version of our innovative PDF library - to program PDF documents in Java or .NET (C#). iText is a more versatile, programmable and enterprise-grade PDF solution that allows you to embed its functionalities within your own software for digital transformation. iText Core is available under open source (AGPL) as well as a commercial license. iText SDK available on AWS iText is now available on the AWS Marketplace. iText Suite BYOL offers a wide range of common PDF tasks for developers to use at their utmost convenience using the REST API. Discover more How it works To demonstrate the powerful high-level capabilities of the iText Core library,hereis a simple "Hello World!" example showing how to createa PDFinjust a few lines of Java or C#: import com.itextpdf.kernel.pdf.*; import com.itextpdf.layout.Document; import com.itextpdf.layout.element.Paragraph; import java.io.*; public class HelloWorld { public static final String DEST = "/myfiles/hello.pdf"; public static void main(String args[]) throws IOException { PdfDocument pdf = new PdfDocument(new PdfWriter(DEST)); Document document = new Document(pdf); String line = "Hello! Welcome to iTextPdf"; document.add(new Paragraph(line)); document.close(); System.out.println("Awesome PDF just got created."); } } using System; using System.IO; using iText.Kernel.Pdf; using iText.Layout; using iText.Layout.Element; class Program { static void Main() { PdfDocument pdfDocument = new PdfDocument(new PdfWriter(new FileStream("/myfiles/hello.pdf", FileMode.Create, FileAccess.Write))); Document document = new Document(pdfDocument); String line = "Hello! Welcome to iTextPdf"; document.Add(new Paragraph(line)); document.Close(); Console.WriteLine("Awesome PDF just got created."); } } Benefits Why use iText Core? With iText Core you don't have to worry about PDF technologies and standards,you can just focus on your business needsand document content. The high-level API provides easy methods to create, and manipulate PDF documents in all kinds of ways, such as splitting, merging, form filling, and much more. At the same timeyour developmentteam has full access to all internal PDF structures, with the low-level API offering them thepossibility to read, insert, update and delete any PDF object they want. In additionto this, they can benefit from ourrich and up-to-date technical documentation intheKnowledge Base. Focus on the high level, business logic High-level APIs allow you to keep focus on your business logic and document content as iText Core offers an abstract document model. Focus on the low level, with internal PDF structures The low-level APIs give full access to the internal PDF structures, which allowyou to read, insert, update and delete any PDF document. Meet Global PDF Standards PDF: PDF 1.x, PDF 1.7 (ISO 32000-1), PDF 2.0 (ISO 32000-2) from iText Core 7.1 on. Archiving: PDF/A-1, PDF/A-2, PDF/A-3, PDF/A-4 (ISO 19005-1, -2, -3, and -4, alllevels). Accessibility: PDF/UA (ISO 14289-1). Digital signatures: PAdES (ETSI EN 319 142 / ETSI TS 102 778). Interactive Forms: Fill, extractand flatten AcroForms andXFDF. Fill, extract and check for XFAfiles. Support for SVG. Key features Main Capabilities of iText Core iText Core is a straightforward,performant and extensible library that is ready to handle thechallenges of today's digital document workflows. Embed iText Corescode libraries in applications to create the typeof PDF files you want. Whether youre creatingbatches of files automatically to add to a digitalarchive or you want to set up a form campaign foryour customers, iText Core can help you get it right. Customizable & extensible The comprehensive Java and .NET (C#) PDF libraries haveboth out of the box functionality, for easy use,and the flexibility to extend and customize to meet your needs. iText Core focuses on easy integration and open standards. iText Core add-ons iText Core has a number of add-ons forspecific use cases you may en

itextpdf.com

in which viewer does server required to open the pdf using itext.kernel in c#

In the context of using itext.kernel in C# to manipulate PDF files, a server generally does not require any specific PDF viewer to open the PDF documents. The itext.kernel library allows for programmatic creation, manipulation, and processing of PDF files, typically without the need for a dedicated PDF viewer on the server side.

When using itext.kernel in C# to handle PDF documents on a server, the primary focus is on server-side processing and generation of PDF files rather than viewing them in a PDF viewer. PDF viewers are typically used on the client side for end-user interaction and visualization of PDF content.

It's important to note that the itext.kernel library enables C developers to work with PDF documents programmatically, allowing them to create, modify, and extract data from PDF files within server-side applications.

Therefore, in the context of server-side use of itext.kernel in C#, the focus is more on PDF document generation, manipulation, and management rather than on interacting with PDF content in a viewer on the server.

One of the most interesting features that has been added to the PDF format since its inception way back in 1993 is the ability to create portable collections, more commonly known as PDF portfolios. Portable collections were introduced by the ISO committee as part of the PDF 1.7 specification (and expanded in PDF 2.0) and can contain multiple files integrated into a single PDF. Although portable collection is the name defined in the specification, for convenience well be using PDF portfolio for the rest of this article. Can't I just combine files into a PDF? This feature offers similar functionality to combining files into a single PDF but differs in one major respect. Simply combining files means that all the files will be converted to PDF, whereas creating a PDF portfolio preserves the files in their original file format and you can edit or modify them in their native application without removing them from the portfolio. It should be noted that if the portfolio is signed with adigital signature, then edits to documents will break the signature since it covers the whole PDF including the PDF portfolio and its files. Well look at digital signatures and how they work in PDF portfolios later in this article. PDF includes features such as "embedded file streams"(PDF 1.3) and "associated files"(PDF/A-3 and PDF 2.0) which allow the containment and characterization of arbitrary content (such as files commonly found in email attachments) within the PDF file. As noted in this article from the PDF Association, the PDF standard includes embedded-file, metadata, navigation, data-protection and accessibility/reuse features in an ISO-standardized, vendor-independent specification. In a similar way that PDF documents can be a container for other types of data, PDF portfolios themselves are also a data container format that enable you to collect many different file types together in a single file. What can I use PDF portfolios for? There are many business use cases and applications where PDF portfolios could be ideal. For example, loan application requests where there are forms to fill out and read-only disclosures, or packets for new employees containing information such as health insurance forms and company policy documents in different formats. They can also be used for non-business applications too, such as art students who need to submit a portfolio for college. Using a PDF portfolio, they can easily incorporate original images, photographs and videos into a single file without needing to worry about compression artifacts affecting the perception of their work, since unlike a combined PDF where all files are converted to PDF, files contained within the PDF portfolio remain untouched and easily viewed with a supported application. PDF portfolios offer a number of benefits, depending on your use case. For example, imagine you run a construction company that is building a house. There might be various documents relating to the project, such as CAD drawings, pictures, Word documents such as .doc and .docx files, .xls and .xlsx spreadsheets for the budget etc. All these files could be neatly packaged into a PDF portfolio for convenience, so everything relating to the project can be shared easily with anyone that needs it. Our house construction PDF portfolio containing a number of different documents. If the document file type is supported by your PDF viewer, you can also preview the document without opening it in the native applicationBut PDF portfolios are not just a convenient container format, they also have significant security benefits as well. Lets imagine your construction company is contracted to build a government facility, such as a prison. The files relating to this type of project would be similar, but now you are required to meet much more stringent confidentiality and security standards. For PDF documents that relate to the project you can use PDF digital signatures to ensure they are secured. But how do you digitally sign all

itextpdf.com

By Chandra Kudumula Introduction This article is about generating PDF documents using C#, .NET, and the iText library. I had a requirement to generate an invoice as a PDF document for one of the projects I worked on. In my research, I came to know about iText. iText is a library for creating and manipulating PDF files in .NET and Java. If you are struggling with C#, consider checking out the TechRepublic Academy. Prerequisites Visual Studio 2017 and above .NET Framework, Version 4.0 and above Installed iText 7 Library using NuGet Package Manager Setting Up the Project Step 1: Create the Console App Using Visual Studio In Visual Studio, go to File -> New -> Project. On the New Project window, select the Console App(.NET Framework) and give the project a name, as shown in Figure 1. Figure 1: Selecting the Console App(.NET Framework) Step 2: Install iText 7 Using Manage NuGet Packages Right-click the project name and select Manage NuGet Packages. You can see this in Figure 2. Figure 2: Selecting NuGet Packages Select Browse and, in the search box, type itext7 and select itext7 from the searched results and install (see Figure 3). Figure 3: Selecting itext7 Following are the helpful classes and methods to generate the PDF document: PdfWriter: To pass the file name and write content to the document. PdfDocument: In-memory representation of the PDF document. It will open a PDF document in writing mode. Document: Creates a document from in-memory PdfDocument. Paragraph: Creates a paragraph, initialized with some text. SetFontSize: Sets the font size of the text. SetTextAlignment: Sets the text alignment, such as Left, Right, Center, and so forth. I will add a Header, SubHeader, Line Separator, Image, Table, Hyperlink, and finally page numbers to the PDF document. A. Adding a Header Add a header to the PDF document. Header Content is center aligned to the document and I set the font size to 20. We can achieve this by creating a paragraph object. Following is the code snippet to create a paragraph object and add it to the document object. Finally, we need to close the document object by calling the Close() method. using iText.Kernel.Pdf; using iText.Layout; using iText.Layout.Element; using iText.Layout.Properties; namespace GeneratePdfDemo { class Program { static void Main(string[] args) { // Must have write permissions to the path folder PdfWriter writer = new PdfWriter("C:\\demo.pdf"); PdfDocument pdf = new PdfDocument(writer); Document document = new Document(pdf); Paragraph header = new paragraph("HEADER") .SetTextAlignment(TextAlignment.CENTER) .SetFontSize(20); document.Add(header); document.Close(); } } } Run the program and go to the path specified in PdfWriter and open the PDF document. Figure 4 is the image of a PDF document with header text. Figure 4: Showing the header text B. Creating a Sub Header Create a Sub Header with text alignment center and set the font size to 15. Add this Sub Header to the document object, as shown in Figure 5. Paragraph subheader = new Paragraph("SUB HEADER") .SetTextAlignment(TextAlignment.CENTER) .SetFontSize(15); document.Add(subheader); Figure 5: Creating the Sub Header C. Adding a Horizontal Separator Line Add a horizontal line using Line Separator. This is shown in Figure 6. // Line separator LineSeparator ls = new LineSeparator(new SolidLine()); document.Add(ls); Figure 6: Creating the separator line D. Adding an Image Add an Image to the PDF document by using an Image instance (see Figure 7). // Add image Image img = new Image(ImageDataFactory .Create(@"..\..\image.jpg")) .SetTextAlignment(TextAlignment.CENTER); document.Add(img); Figure 7: Adding an image E. Creating a Table Create a Table and add it to the document, as shown in Figure 8. // Table Table table = new Table(2, false); Cell cell11 = new Cell(1, 1) .SetBackgroundColor(ColorConstants.GRAY) .SetTextAlignment(TextAlignment.CENTER) .Add(new Paragraph("State")); Cell cell12 = new Cell(1, 1) .SetBackgroundColor(ColorConstants.GRA

codeguru.com

IronPDFIronPDF BlogProduct ComparisonsItext7 Read PDF in C#Published June 21, 2023PDF is a portable document format created by Adobe Acrobat Reader, widely used for sharing information digitally over the internet. It preserves the formatting of data and provides features like setting security permissions and password protection. As a C# developer, you may have encountered scenarios where integrating PDF functionality into your software application is necessary. Building it from scratch can be a time-consuming and tedious task. Therefore, considering the performance, effectiveness, and efficiency of the application, the trade-off between creating a new service from scratch or using a prebuilt library is significant.There are several PDF libraries available for C#. In this article, we will explore two of the most popular PDF libraries for reading PDF documents in C#.iText softwareiText 7, formerly known as iText 7 Core, is a PDF library to program PDF documents in .NET C# and Java. It is available as open source license (AGPL) and can be licensed for commercial applications.iText Core is a high level API which provides easy methods to generate, and edit PDFs in all possible ways. With iText 7 Core you can split, merge, annotate, fill forms, digital sign and do much more on PDF files. iText 7 provides an HTML to PDF converter.IronPDFIronPDF is a .NET and .NET Framework C# and Java API which is used for generating PDF documents from HTML, CSS and JavaScript either from a URL, HTML files or HTML strings. IronPDF allows you to manipulate existing PDF files like, splitting, merging, annotating, digital signing and much more.IronPDF is enriched with 50+ features to create, read and edit PDF files. It prioritizes speed, ease of use and accuracy when you need to deliver high quality, pixel perfect professional PDF files with Adobe Acrobat Reader. The API is well documented and a lot of sample source code can be found on its code examples page.Create a Console ApplicationWe are going to use Visual Studio 2022 IDE for creating an application to start with. Visual Studio is the official IDE for C# development, and you must have installed it. You can download it from Microsoft Visual Studio website, if not installed.Following steps will create a new project named "DemoApp".Open Visual Studio and click on "Create a New Project".Select "Console Application" and click "Next".Set the name of the project.Select the .NET version. Choose the stable version .NET 6.0.Install IronPDF LibraryOnce the project is created, IronPDF library needs to be installed in the project in order to use it. Follow these steps to install it.Open NuGet Package Manager, either from solution explorer or Tools.Browse for IronPDF Library and select for the current project. Click Install.Add the following namespace at the top of Program.cs fileusing IronPDF;using IronPDF;Imports IronPDFVB C#Install iText 7 LibraryOnce the project is created, iText 7 library needs to be installed in the project in order to use it. Follow the steps to install it.Open NuGet Package Manager either from solution explorer or Tools.Browse for iText 7 Library and select for the current project. Click install.Add the following namespaces at the top of Program.cs fileusing iText.Kernel.Pdf.Canvas.Parser.Listener; using iText.Kernel.Pdf.Canvas.Parser; using iText.Kernel.Pdf;using iText.Kernel.Pdf.Canvas.Parser.Listener; using iText.Kernel.Pdf.Canvas.Parser; using iText.Kernel.Pdf;Imports iText.Kernel.Pdf.Canvas.Parser.Listener Imports iText.Kernel.Pdf.Canvas.Parser Imports iText.Kernel.PdfVB C#Open PDF filesWe are going to use the following PDF file to extract text from it. It is a two-page PDF document.Using iText libraryTo open a PDF file using iText library it is a two-step process. First, we create a PdfReader object and pass the file location as a parameter. Then we use PdfDocument class to create a new PDF document. The code goes as follows:PdfReader pdfReader = new PdfReader("sample.pdf"); PdfD

ironpdf.com

then it is not opening the pdf through programatically in c#, what can be done?

When encountering issues with programatically opening PDF files using iText Kernel in C#, there are a few potential steps to troubleshoot and address the issue:

  1. Error Handling: Implement robust error handling mechanisms in your code to capture and log any specific error messages or exceptions that occur when attempting to open the PDF file.

  2. File Path: Ensure that the file path provided for opening the PDF is correct and accessible your program. Double-check the file path and verify that the file exists at the specified location.

  3. PDF Format: Validate the PDF file format and verify whether it complies with the specifications supported by iText Kernel in C#. Different versions of the PDF format or certain features may not be fully supported by the library.

  4. Code: Review the code responsible for opening the PDF document in your C# application. Verify that the necessary iText Kernel API classes and methods are being used correctly for reading and manipulating PDF files.

  5. Library Compatibility: Ensure that the iText Kernel library version being used is compatible with your C# application and the target environment. Consider updating to the latest version of the library to potentially address any known issues or bugs related to opening PDF documents.

  6. Support and Documentation: Refer to the official iText documentation, release notes, and community forums for any known issues, best practices and troubleshooting guidance related to opening PDF files programmatically using iText Kernel in a C# application.

By employing these, you can systematically diagnose and address the issue of not being able to open PDF files programmatically in C# using iText Kernel, potentially resolving the issue and enabling successful PDF file access within your application.

IronPDFIronPDF BlogProduct ComparisonsItext7 Read PDF in C#Published June 21, 2023PDF is a portable document format created by Adobe Acrobat Reader, widely used for sharing information digitally over the internet. It preserves the formatting of data and provides features like setting security permissions and password protection. As a C# developer, you may have encountered scenarios where integrating PDF functionality into your software application is necessary. Building it from scratch can be a time-consuming and tedious task. Therefore, considering the performance, effectiveness, and efficiency of the application, the trade-off between creating a new service from scratch or using a prebuilt library is significant.There are several PDF libraries available for C#. In this article, we will explore two of the most popular PDF libraries for reading PDF documents in C#.iText softwareiText 7, formerly known as iText 7 Core, is a PDF library to program PDF documents in .NET C# and Java. It is available as open source license (AGPL) and can be licensed for commercial applications.iText Core is a high level API which provides easy methods to generate, and edit PDFs in all possible ways. With iText 7 Core you can split, merge, annotate, fill forms, digital sign and do much more on PDF files. iText 7 provides an HTML to PDF converter.IronPDFIronPDF is a .NET and .NET Framework C# and Java API which is used for generating PDF documents from HTML, CSS and JavaScript either from a URL, HTML files or HTML strings. IronPDF allows you to manipulate existing PDF files like, splitting, merging, annotating, digital signing and much more.IronPDF is enriched with 50+ features to create, read and edit PDF files. It prioritizes speed, ease of use and accuracy when you need to deliver high quality, pixel perfect professional PDF files with Adobe Acrobat Reader. The API is well documented and a lot of sample source code can be found on its code examples page.Create a Console ApplicationWe are going to use Visual Studio 2022 IDE for creating an application to start with. Visual Studio is the official IDE for C# development, and you must have installed it. You can download it from Microsoft Visual Studio website, if not installed.Following steps will create a new project named "DemoApp".Open Visual Studio and click on "Create a New Project".Select "Console Application" and click "Next".Set the name of the project.Select the .NET version. Choose the stable version .NET 6.0.Install IronPDF LibraryOnce the project is created, IronPDF library needs to be installed in the project in order to use it. Follow these steps to install it.Open NuGet Package Manager, either from solution explorer or Tools.Browse for IronPDF Library and select for the current project. Click Install.Add the following namespace at the top of Program.cs fileusing IronPDF;using IronPDF;Imports IronPDFVB C#Install iText 7 LibraryOnce the project is created, iText 7 library needs to be installed in the project in order to use it. Follow the steps to install it.Open NuGet Package Manager either from solution explorer or Tools.Browse for iText 7 Library and select for the current project. Click install.Add the following namespaces at the top of Program.cs fileusing iText.Kernel.Pdf.Canvas.Parser.Listener; using iText.Kernel.Pdf.Canvas.Parser; using iText.Kernel.Pdf;using iText.Kernel.Pdf.Canvas.Parser.Listener; using iText.Kernel.Pdf.Canvas.Parser; using iText.Kernel.Pdf;Imports iText.Kernel.Pdf.Canvas.Parser.Listener Imports iText.Kernel.Pdf.Canvas.Parser Imports iText.Kernel.PdfVB C#Open PDF filesWe are going to use the following PDF file to extract text from it. It is a two-page PDF document.Using iText libraryTo open a PDF file using iText library it is a two-step process. First, we create a PdfReader object and pass the file location as a parameter. Then we use PdfDocument class to create a new PDF document. The code goes as follows:PdfReader pdfReader = new PdfReader("sample.pdf"); PdfD

ironpdf.com

In our previous post, we talked about iTextPdf API for working with PDF files using C#/VB.NET in .NET applications. The API lets you create, edit and manipulate PDF documents without going into any internal file format details of PDF file format. Using iTextPdf is easy to work with and with just a few lines of code, you can start creating, reading, and manipulating PDF files.In this article, we will talk about using iTextPdf in .NET application to create, read, and save PDF files programmatically in our C# application. So, lets get started and have a look at how we can create a PDF in C#.iTextPdf InstallationYou can install iTextPdf API either from NuGet or from iText Artifactory Server. Before you can create your C# application for using the iTextPdf API, you need to install it from either of these sources. You can refer to the instructions article for installing iTextPdf API for setting up your console application for this purpose.Overview of Main iTextPdf API ClassesSome of the main iTextPdf classes are as follows.PdfDocumentEvery PDF document created with iTextPdf is initiated using an object of the PdfDocument class.PdfWriterPdfWriter class is responsible for writing the PDF content to a destination, such as a file or a stream. It provides the functionality to create a PDF document and specify the output destination. Some key features and responsibilities of PdfWriter class are as follows.Destination ConfigurationThe PdfWriter constructor allows you to specify the output destination for the PDF content. It can accept parameters like a file path, a Stream object, or an instance of IOutputStreamCounter. This determines where the PDF content will be written.PDF Document CreationWhen you create a new instance of PdfWriter, it automatically creates a new PdfDocument object associated with it. The PdfDocument represents the logical structure of a PDF file and provides methods to manipulate its content.PDF Compression and Version ControlThe PdfWriter class allows you to configure various aspects of the PDF file, such as compression settings and PDF version compatibility.Writing PDF ContentOnce you have a PdfWriter instance, you can use it to write content to the associated PdfDocument. You can add pages, create annotations, add text, images, and other graphical elements to the PDF document using the provided methods.Closing the WriterAfter you finish writing the PDF content, its important to close the PdfWriter to ensure the document is finalized and any necessary resources are released.ParagraphThe Paragraph class represents a paragraph of text in a PDF document. It is used to add textual content to a PDF document. Here are some key features and responsibilities of the Paragraph class:Text ContentThe primary purpose of the Paragraph class is to hold and display textual content within a PDF document. You can pass a string or any other text representation to the Paragraph constructor to initialize its content.Text FormattingThe Paragraph class allows you to apply various formatting options to the text, such as font size, font family, text color, bold, italic, underline, and more. You can use methods like SetFontSize(), SetFont(), SetBold(), SetItalic(), SetUnderline(), etc., to specify the desired formatting.Alignment and IndentationThe Paragraph class provides methods to set the alignment of the text within the paragraph. You can align the text to the left, right, or center, or justify it. Additionally, you can apply indentation to control the left and right margins of the paragraph.Inline ElementsApart from plain text, you can also add inline elements within a Paragraph. For example, you can include phrases or words with different formatting styles, add hyperlinks, insert images, or include other elements supported by iText.NestingYou can nest multiple paragraphs within each other or combine them with other iText elements like tables, lists, or chunks to create complex document structures.Integration with DocumentThe Paragraph

blog.fileformat.com

README Frameworks Dependencies Used By Versions Release Notes iText represents the next level of SDKs for developers that want to take advantage of the benefits PDF can bring. Equipped with a better document engine, high- and low-level programming capabilities and the ability to create, edit and enhance PDF documents, the iText PDF library can be a boon to nearly every workflow. iText allows you to build custom PDF scenarios for web, mobile, desktop or cloud apps in .NET. iText was built on nearly a decade of lessons learned from iText 5 (iTextSharp) development. It is a simpler, more performant and extensible library that is ready to handle the increased challenges of today's document workflows, one add-on at a time. The iText Suite consists of iText Core and several add-ons. The add-ons are accessible as different packages. What you can do with iText: Generate PDFs: Mass generation of PDFs, including tagged PDFs which contain metadata to describe the document structure and the order of its elements (e.g. titles, text blocks, columns and pictures) Convert images to PDF Convert HTML to PDF (with the pdfHTML iText add-on) iText is unique in its breadth of language support, including Indic languages, Thai, Khmer, Arabi, Hebrew, Chinese, Japanese, Korean, Cyrillic languages and many more, in combination of (with the pdfCalligraph iText add-on) Edit and manipulate PDFs: Split or merge PDFs, delete pages from a PDF Rotate a PDF or specific pages Add passwords and PDF permission options to a PDF, or remove password protection from a PDF Update/add content, PDF objects [dictionaries etc.], watermarks, bookmarks Remove sensitive data, Regex based redaction (PDF redaction) (with the pdfSweep iText add-on) Create and modify annotations Programmatically fill out PDF forms (AcroForm and XFA) Flatten AcroForms Read XFA Flatten XFA (with the pdfXFA iText add-on) Secure PDFs: Encryption and decryption Digital signatures: signing and validating Extract data from PDFs: Extraction of images, tables, text (PDF parsing) Template based data extraction (with the pdf2Data iText add-on) Compliance: PDF 2.0 PDF/A: PDF/A-1(a,b), PDF/A-2(a,b,u), PDF/A-3(a,b,u) PDF/UA Visit our knowledge base to find code samples, manuals, documentation and more. You can also find its API here. Try our code in our developer sandbox or use our free apps, all in our iText Demo Lab. .NETFramework 4.6.1 itext (>= 8.0.2) .NETStandard 2.0 itext (>= 8.0.2) NuGet packages (94) Showing the top 5 NuGet packages that depend on itext7: Package Downloads itext7.licensekey.volume License Key Volume allows to send iText 7 usage information as required by the Capacity Rental License. 224.2K Foresight.Common.CS Nuget is Custom built for downloaading nuget dependencies for Foresight Solutions Developers. 118.6K Gaia.Portal.Framework.Pdf Package Description 102.7K CamelliaManagementSystem Util for working with Camellia service 83.5K CLUtilitarios Add new date helpers to generate pdf 77.6K GitHub repositories (12) Showing the top 5 popular GitHub repositories that depend on itext7: Repository Stars iamoldli/NetModular NetModular .Net Core Vue.js 1.3K CodeMazeBlog/CodeMazeGuides The main repository for all the Code Maze guides 635 chummer5a/chummer5a Character generator for Shadowrun 5th edition 591 approvals/ApprovalTests.Net ApprovalTest verification library for .Net 549 clawsoftware/clawPDF Open Source Virtual (Network) Printer for Windows that allows you to create PDFs, OCR text, and print images, with advanced features usually available only in enterprise solutions. 519 Version Downloads Last updated 8.0.2 21,226 25/10/2023 8.0.1 243,048 02/08/2023 8.0.0 347,700 10/05/2023 7.2.5 1,046,665 16/01/2023 7.2.4 646,414 25/10/2022 7.2.3 1,033,579 05/07/2022 7.2.2 802,568 11/04/2022 7.2.1 915,440 11/01/2022 7.2.0 738,698 25/10/2021 7.1.18 30,903 14/12/2022 7.1.17 207,750 25/10/2021 7.1.16 1,270,888 05/07/2021 7.1.15 817,798 13/04/2021 7.1.14 862,035 14/01/2021 7.1.13 683,681 22/10/2020 7.1.1

nuget.org

this is working in QA environment but not in production environment, what does it mean

If a solution works in a quality assurance (QA) environment but not in a production environment, it generally indicates that there are discrepancies between the two environments. This disparity may result from differences in configurations, data, infrastructure, or access permissions. Common reasons for this issue include:

  1. Configuration Differences: There may be variations in the configuration settings between the QA and production environments, such as database connections, API endpoints, or security configurations.

  2. Data Discrepancies: The data used in the QA environment might differ from the data, leading to issues related to data integrity, structure, or volume.

  3. Infrastructure Disparity: Differences in hardware, network setup, or server configurations between QA and production environments can impact the behavior of the solution.

  4. Access Control: Permissions and access rights may be more restrictive in the production environment, causing issues related to file access, network communication, or other resources.

To address this issue, it's essential to carefully compare the QA and production environments, analyze the differences, and then take appropriate actions to align the production environment with the QA environment. This may involve thorough testing, configuration adjustments, data synchronization, and collaboration with system administrators or IT personnel to ensure consistency between the environments.

IronPDFIronPDF BlogProduct ComparisonsItext7Published September 1, 2022Convert your webpages into PDF documents quickly and easily using the IronPDF library for C# and Java. IronPDF supports all forms of HTML content and renders them with pixel-perfect precision. No fuss. No stress. This library just simply works.Continue reading to learn about how IronPDF for C# stacks up against the iText7 PDF Library for .NET. For the comparison between the Java version of both libraries, refer to this blog post.The need to generate PDFs in C#, either for users or to save locally, is something that arises on a fairly regular basis. I was recently underwhelmed by the options available to actually achieve this when I tried to do it. There is nothing in C# or .NET Core that can generate PDFs for you natively. Plus, there was a slew of issues when it came to actually looking at the feature sets of third-party libraries (for example, if I wish to use HTML as a template option).As a result, rather than showing you code to make a PDF using a specific PDF library, I'll compare two of these libraries: IronPDF and iText 7.IronPDF and iText 7 are two libraries that can be used in your Microsoft .NET application to create, read, and edit PDF documents, whether they are online or on a desktop with better internal PDF structures. Let's examine the two libraries to see which one is the most appropriate for our purposes. We'll first compare the features of the two libraries, then see how well they convert and edit a PDF using a better document engine. Microsoft's .NET frameworks support both libraries.Before we begin, here is what we should expect when looking for suitable software to generate and manipulate PDFs in .NET core, and one that can also be used to debug PDFs.How to Use iText7 in C# (Example tutorial)Install iText7 library to edit PDF file in C#Convert HTML to PDF utilizing HtmlConverter classUse PDFReader class to read and extract PDF contentSign document in iText7 with SignDetached methodExport the finished PDF file to desire locationWhat to expect from a .NET PDF files libraryPriceFree software is obviously the most desirable, and even better if it's open-source that way I can debug it myself. However, if I am required to pay for a "premium" library, I will. I'm seeking a one-time price that isn't based on some nonsense like "per user/seat/machine/server." If I'm a corporation looking at this library, I don't want future architecture or decisions to be predicated on the library's pricing.If there were a freemium model in play, I would also want to make sure that the restrictions were reasonable (e.g. single pages only, set number of images allowed per PDF, etc.). It's fine to employ a freemium model as long as the free version is truly usable.Templating in HTMLI'd previously determined that HTML would be my templating language of choice. I was open to utilizing any other sensible alternative (e.g. HTML with some XSLT engine), but in the end, I just want to input an HTML file into the library and have my PDF generated. I don't want to have to manually position each element on the PDF, as we used to have to do when printing a document from a WinForms program.All-in-One/Ease Of UseThis is certainly a personal preference, but when you start looking for libraries in obscure places on the internet or in a Stack Overflow answer from three years ago, you frequently end up with a half-baked library that doesn't work. I'm likely to see it all, whether it's a C++ library ported to C#, a library that requires X number of other libraries to function, or things that just don't operate as they should. Above all, I want to be up and operating in minutes rather than hours.What is IronPDF?IronPDF is a highly efficient PDF tool and capable PDF converter that can do practically anything a browser can. It's a PDF library for programmers that makes creating, reading, and manipulating PDF files a breeze using low-level programming capabilities. IronPDF converts HT

ironpdf.com

IronPDFIronPDF BlogProduct ComparisonsCreate PDF From Byte Array C# iTextSharpPublished May 31, 20231.0 IntroductionAdobe developed the Portable Document Format to facilitate the sharing of text and image-based documents (PDF). To view a PDF image file, you must use a different application. Many businesses use PDF documents in today's culture for a variety of tasks, including the preparation of invoices and other paperwork.Developers also use the existing PDF file format to produce documents or image file that adhere to client specifications. Fortunately, libraries that simplify the process have made producing PDFs simpler than ever. Consider factors like build, read, and convert capabilities when picking a library for your project in order to select the finest one that is readily available.In this post, two of the most widely used Dot NET PDF libraries will be compared. They are:iText PDFIronPDFIn your Microsoft.NET application or project, you can create, read, and modify PDFs using either the IronPDF or iText PDF libraries. We will have a look at the capabilities of the 2 libraries first rather than shifting directly to the overall performance, fees for converting and handling the PDFs in order to determine which library is better for your application. Microsoft.NET Frameworks support both libraries. Additionally, each library's duration will be recorded for reference and later research. To know about the comparison, click here.2. Library Features2.1 iText PDF FeaturesA Java library and system that can convert text into PDF files is called iText PDF. Text adheres to the AGPL software licensing model. The AGPL software license is free and open-source.An API for producing PDF files is available via the iText library.Both HTML and XML strings can be parsed into PDF using the iText program's var reader.We may add bookmarks, page numbers, and markers to our PDF documents using the iText library.We can split a PDF file into multiple PDFs or combine multiple PDF files into a single PDF by using the iText library.We can edit forms in PDFs using iText.Using images from PNG, JPEG, and other image formats, iText can also make PDFs.A Canvas class is offered by the iText library and can be used to draw different geometrical forms on pre-existing texts.In PDF documents, iText provides a tool that allows you to add and edit fonts and images.2.2 IronPDF FeaturesDevelopers can quickly produce, read, and change PDF files with the help of the robust IronPDF, a PDF .NET library. IronPDF has a Chrome engine at its core and offers a wealth of practical and potent capabilities, including the ability to convert HTML5, JavaScript, CSS, and picture files to PDF, add unique Headers and Footers, and produce PDFs precisely as they appear in a web browser. Various web and .NET formats, including HTML, ASPX, Razor View, and MVC, are supported by IronPDF. IronPDF's key attributes are as follows:Easily creating, reading, and editing PDF files within Dot NET C# program.Creating PDFs from a website URL link that has settings for User-Agents, Proxies, Cookies, HTTP Headers, and Form Variables to support login using HTML login forms.Removing photos from already-existing PDF publications.Adding text, photos, bookmarks, watermarks, and other elements to PDF files.Features that make it simple to merge and divide the pages of several PDF documents.The ability to transform media-type assets, including CSS files, into documents.3.0 Install Library3.1 Install iText7Find iText first by using the NuGet Package Manager. iText7 and iText.pdfhtml must both be installed because the features of these packages are divided among numerous packages.Install the following packages as shown below if you prefer the Visual Studio Command-Line:Install-Package itext7 && Install-Package itext7.pdfhtmlSince iText7 is the most recent version, we are using it in our solution.3.2 Install IronPDF LibraryAs seen in the screenshot below, we can easily search for "IronPDF" in the Package Manage

ironpdf.com

Stay up to date and sign up for our newsletter. iText Core Want to generate and manipulate your PDFs with an open source (AGPL) or commercially licensed PDF library and SDK? Get started with iText today! Read more iText Suite A full PDF functionality and software development platform in Java & .NET, to integrate PDF functionalities within your applications, processes and products. Read more iText Community Handle PDFs with this open-source licensed PDF library and SDK, can be used only with the AGPL license. Read more iText Community Support Supported by our ever growing community We have an active community of partners, customers, and contributors, that help us every day to improve our products, documentation and support. We see them as part of our iText family, and hope you will join our family too. We have used iText for over 7 years in the DocuSign flagship product, our eSignature services. We use it with the purpose of extracting text, applying watermarks, and performing other general purpose PDF functions. We use iText to provide high availability and a reliable service to our customers and their documents. iText is very readable and easy to understand. Also, in iText I don't need to write lots of code, you already provide almost all the methods necessary to do something. We chose iText to power the PDF signing part of AIS due to its ease of use and flexibility. Thanks to its provision of an abstraction layer for PDF, it enables our customers to produce digitally signed PDFs without having to know about the PDF specifications. By using iText 7 for Smart Certificate 2.0, it enables us to mass generate PDF documents and sign them with GlobalSign certificates. Using the iText DITO Editor to develop our report templates is a huge time saver. I can now do in just 45 minutes what would have taken over two weeks to do in code using other PDF libraries! We chose iText over other open source solutions because it was really quick and easy to develop our application using iText. That's thanks to the guides and documentation available on the iText website, and the many examples on developer communities like Stack Overflow. I just wanted to let you know that the support I received from your support people was excellent, super prompt, detailed, polite and helpful. Great job! Thanks very much. iText is a breeze! Using a proven and tested PDF technology helped us to focus on what we do best building a high quality mobile app. With iText we have the peace of mind that we are delivering a solid solution to our client. We chose the iText library because it was the only solution that allowed easy integration into our open standards architecture. Featured products Convert from HTML to PDF Create professionally formatted, smart PDF documents with pdfHTML. Convert HTML into standards compliant, accessible, and searchable PDFs. Multiple language and writing systems support pdfCalligraph enables multiple language support. Automatically detect writing systems and make intelligent glyph substitutions using script and font information. Redact PDF content Safely and securely redact content in PDFs using pdfSweep. Automate the redaction process, to eliminate manual document processing and data leaks. Flatten XFA forms pdfXFA enables dynamic PDF generation and flattening of dynamic PDF forms. Use XFA templates to render XML data to PDF, and preprocess XFA forms for PDF workflows. Powerful PDF debugging Analyze partial and unfinished documents during their creation with pdfDebug. Integrates into your IDE to view internal structure of your PDF files. Digital Signatures Increase document security in contracts, non-disclosure agreements etc. Ensure document integrity to prove there have been no unauthorized changes. Automate PDF generation IText enables the automatic generation of multiple types of documents, such as invoices, statements, boarding passes etc. as PDF. Automate PDF processing Extract data PDF documents such as invoices, reports, forms etc

itextpdf.com