Back to rankings

iText for .NET is the .NET version of the iText library, formerly known as iTextSharp, which it replaces. 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 enha

pdflibrarysdkpdf-generationitextsharppdfapdfuadigital-signaturesecurityencryptiondocumentspades
Star Growth
Stars
1.9k
Forks
352
Weekly Growth
Issues
0
5001k1.5k
Jun 2016Oct 2019Mar 2023Jul 2026
README

Logo iText

Nuget AGPL License Nuget 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:

  • Core library:
    • PDF creation with the use of our layout engine
    • PDF manipulation, e.g. merging multiple PDFs into one, adding new content, ...
    • PDF digital signing
    • PDF form creation and manipulation
    • Working with PDF/A documents
    • Working with PDF/UA documents
    • FIPS-compliant cryptography
    • Barcode generation
    • SVG support
  • Addons:
    • Converting XML/HTML & CSS to PDF repo, info
    • Perform OCR on images and PDF documents repo, info
    • Redacting sensitive information in PDF documents repo, info
    • Support for international character sets (e.g. Arabic, Chinese, Hebrew, Thai, ...) info
    • Optimize PDF documents for reduced file size, and increased performance info
    • Flattening XFA documents info
    • PDF debugging repo, info

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 <REPLACE_WITH_DESIRED_ITEXT_VERSION>
dotnet add package itext.bouncy-castle-adapter --version <REPLACE_WITH_DESIRED_ITEXT_VERSION>

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.

Description Link
Basic layout
Change text properties C#, PDF
Creating a simple table C#, PDF
Add an image to a PDF document C#, PDF
Create a list C#, PDF
Add a watermark C#, PDF
Add links to navigate within a document C#, PDF
Create a popup annotation C#, PDF
Change font C#
Add form fields C#

General document settings
Change page size and margin C#, PDF
Write PDF to byte array instead of to disk C#
Change page rotation C#, PDF
Add header and footer C#, PDF
Add dynamic page margins C#, PDF
Add footnotes C#, PDF
Merge documents C#, PDF
Flatten annotations C#

PDF/UA, PDF/A
Create PDF/UA document C#, PDF
Create PDF/A-3 document C#
Create PDF/A-4 document C#
Create WTPDF document C#
Create ZUGFeRD/Factur-X document C#, PDF

Digital signatures
Sign PDF document C#, PDF
Customize signature appearance C#, PDFs
Sign PDF document with PaDES Profile C#, PDFs
Two-phase signing C#, PDFs
Signature validation C#
Signing using PQC algorithms (experimental) C#, PDFs
Custom HTML tag for signature C#, HTML, PDF

FIPS
Enable FIPS C#
FIPS SHA3 example C#

SVG
Convert SVG to a PDF C#
Convert SVG to a PDF using layout C#
Convert SVG as string to PDF C#
Convert SVG to a PdfPage C#
Convert SVG as XObject C#
Convert SVG to a PDF with pdfCalligraph C#

Convert HTML and CSS to PDF Link to repo
Convert simple HTML doc to PDF C#

OCR images or PDFs Link to repo
OCR images and create PDF Using ONNX models, using Tesseract 4
Make PDF searchable Using ONNX models, using Tesseract 4
OCR images to txt file Using ONNX models, using Tesseract 4

Secure redaction of content Link to repo
Redacting content C#
Redact based on regex C#

Support complex writing systems Link to docs
Add Arabic text C#, PDF

Optimizing PDFs Link to docs
Reduce size of PDF C#

XFA flattening Link to docs
Flatten an XFA document C#

RUPS Link to repo
Debug a PDF Latest release

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.

Related repositories
microsoft/markitdown

Python tool for converting files and office documents to Markdown.

PythonPyPIMIT Licenselangchainopenai
168k12.1k
justjavac/free-programming-books-zh_CN

:books: 免费的计算机编程类中文书籍,欢迎投稿

GNU General Public License v3.0pythonjavascript
weibo.com/justjavac
117.7k28.2k
Stirling-Tools/Stirling-PDF

#1 PDF Application on GitHub that lets you edit PDFs on any device anywhere

JavaMavenOtherdockerjava
stirling.com
87.7k7.8k
opendatalab/MinerU

Transforms complex documents like PDFs and Office docs into LLM-ready markdown/JSON for your Agentic workflows.

PythonPyPIOtherextract-datalayout-analysis
opendatalab.github.io/MinerU/
75.4k6.3k
docling-project/docling

Get your documents ready for gen AI

PythonPyPIMIT Licenseaiconvert
docling-project.github.io/docling
63.6k4.5k
siyuan-note/siyuan

A privacy-first, self-hosted, fully open source personal knowledge management software, written in typescript and golang.

TypeScriptnpmGNU Affero General Public License v3.0note-takinglocal-first
b3log.org/siyuan
45.3k2.9k
paperless-ngx/paperless-ngx

A community-supported supercharged document management system: scan, index and archive all your documents

PythonPyPIGNU General Public License v3.0angulararchiving
docs.paperless-ngx.com
43.3k2.9k
PDFMathTranslate/PDFMathTranslate

[EMNLP 2025 Demo] PDF scientific paper translation with preserved formats - 基于 AI 完整保留排版的 PDF 文档全文双语翻译,支持 Google/DeepL/Ollama/OpenAI 等服务,提供 CLI/GUI/MCP/Docker/Zotero

PythonPyPIGNU Affero General Public License v3.0chineselatex
pdf2zh.com
35.7k3.2k
ocrmypdf/OCRmyPDF

OCRmyPDF adds an OCR text layer to scanned PDF files, allowing them to be searched

PythonPyPIMozilla Public License 2.0pythonocr
ocrmypdf.readthedocs.io
34.2k2.4k
hehonghui/awesome-english-ebooks

经济学人(含音频)、纽约客、卫报、连线、大西洋月刊等英语杂志免费下载,支持epub、mobi、pdf格式, 每周更新

CSSnpmdownloadebooks
33.9k2.8k
posquit0/Awesome-CV

:page_facing_up: Awesome CV is LaTeX template for your outstanding job application

TeXLaTeX Project Public License v1.3ctexoverleaf
28.1k5.3k
koreader/koreader

An ebook reader application supporting PDF, DjVu, EPUB, FB2 and many more formats, running on Cervantes, Kindle, Kobo, PocketBook and Android devices

LuaGNU Affero General Public License v3.0luajitkobo
koreader.rocks
27.9k1.8k