Home

Awesome

<p align="center"> <img src="./assets/iText_Logo_Small.png" alt="Logo iText"> </p>

Nuget AGPL License Nuget GitHub commit activity (branch)

iText Core/Community (previously known as iTextSharp) is a high-performance, battle-tested library that allows you to create, adapt, inspect and maintain PDF documents, allowing you to add PDF functionality to your software projects with ease. It is also available for Java.

The key features of iText Core/Community are:

Want to discover what's possible? Head over to our Demo Lab! It contains a collection of demo applications ready to use online!

Getting started

The easiest way to get started is to use NuGet, just execute the following install command in the folder of your project:

dotnet add package itext --version 8.0.2
dotnet add package itext.bouncy-castle-adapter --version 8.0.2

For more advanced use cases, please refer to the Installation guidelines. You can also build iText Community from source.

Hello PDF!

The following example shows how easy it is to create a simple PDF document:

using iText.Kernel.Pdf;
using iText.Layout;
using iText.Layout.Element;

namespace HelloPdf {
    class Program {
        static void Main(string[] args) {
            using var document = new Document(new PdfDocument(new PdfWriter("helloworld-pdf.pdf")));
            document.Add(new Paragraph("Hello World!"));
        }
    }
}

Examples

For more advanced examples, refer to our Knowledge Base or the main Examples repo. You can find C# equivalents to the Java Signing examples here, though the Java code is very similar since they have the same API.

Some of the output PDF files will be incorrectly displayed by the GitHub previewer, so be sure to download them to see the correct results.

DescriptionLink
Basic layout
Change text propertiesC#, PDF
Creating a simple tableC#, PDF
Add an image to a PDF documentC#, PDF
Create a listC#, PDF
Add a watermarkC#, PDF
Add links to navigate within a documentC#, PDF
Create a popup annotationC#, PDF
Change fontC#
Add form fieldsC#
<br>
General document settings
Change page size and marginC#, PDF
Write PDF to byte array instead of to diskC#
Change page rotationC#, PDF
Add header and footerC#, PDF
Merge documentsC#, PDF
Flatten annotationsC#
<br>
PDF/UA, PDF/A
Create PDF/UA documentC#, PDF
Create PDF/A-3 documentC#
<br>
FIPS
Enable FIPSC#
FIPS SHA3 exampleC#
<br>
Convert HTML and CSS to PDFLink to repo
Convert simple HTML doc to PDFC#
<br>
Secure redaction of contentLink to repo
Redacting contentC#
Redact based on regexC#
<br>
Support complex writing systemsLink to docs
Add Arabic textC#, PDF
<br>
Optimizing PDFsLink to docs
Reduce size of PDFC#
<br>
XFA flatteningLink to docs
Flatten an XFA documentC#
<br>
RUPSLink to repo
Debug a PDFC#

FAQs, tutorials, etc.

Check out the iText Knowledge Base for the iText Jump-start tutorial and other tutorials, FAQs and more. For specific information and examples relating to digital signatures and iText, make sure to check the Digital Signatures Hub.

Many common questions have already been answered on Stack Overflow, so make sure to also check there.

Contributing

Many people have contributed to iText Core/Community over the years. If you've found a bug, a mistake in documentation, or have a hot new feature you want to implement, we welcome your contributions.

Small changes or fixes can be submitted as a Pull Request, while for major changes we request you contact us at community@apryse.com so we can better coordinate our efforts and prevent duplication of work.

Please read our Contribution Guidelines for details on code submissions, coding rules, and more.

Licensing

iText is dual licensed as AGPL/Commercial software.

AGPL is a free/open-source software license, however, this doesn't mean the software is gratis!

The AGPL is a copyleft license, which means that any derivative work must also be licensed under the same terms. If you’re using iText in software or a service which cannot comply with the AGPL terms, we have a commercial license available that exempts you from such obligations.

Contact Sales for more info.