Get TerraPDF
Free, open-source, and ready to use. Add a pure C# PDF generator to your .NET project in seconds.
đĻ Install via NuGet
The easiest way to get the TerraPDF .NET PDF library is through NuGet.
dotnet add package TerraPDF
Package Information
| Package ID | TerraPDF |
| Latest Version | 2.0.0 (July 23, 2026) |
| Downloads | View on NuGet |
| Target Frameworks | .NET 8, .NET 9, .NET 10 |
| Dependencies | None â zero dependencies |
| License | MIT |
đ Quick Links
GitHub Repository
Source code, issues, pull requests, and community discussions.
đ¨ Build from Source
Prefer to build from source? Clone and compile TerraPDF yourself:
git clone https://github.com/sahebansari/TerraPDF.git
cd TerraPDF
dotnet build
dotnet testRequirements
- .NET 10 SDK (the repository's
global.jsonrequires it for building from source) - Git for cloning the repository
- No other dependencies â TerraPDF is pure C#
CI/CD: TerraPDF uses GitHub Actions for continuous integration and automated NuGet publishing on release tags.
đ Version History
See what's new in each release:
v2.0.0 - July 23, 2026
- Custom font embedding â
FontFamily.Register(...)embeds a TrueType font (regular/bold/italic/bold-italic) as aType0/CIDFontType2composite font withIdentity-Hencoding, unlocking full Unicode text beyond the standard fonts' WinAnsiEncoding range â brand typefaces, Cyrillic, Greek, and more. - Devanagari-aware rendering (pure C#, no native dependency) â automatic matra reordering, conjunct ligatures (⤏āĨā¤ĩ, ā¤āĨ⤎, ā¤āĨā¤), reph (⤧⤰āĨā¤Ž, ā¤ĩ⤰āĨā¤¤ā¤Žā¤žā¤¨), and below/post-base 'ra' forms (ā¤āĨ⤰, ⤤āĨ⤰, ā¤ĒāĨ⤰, ⤎āĨā¤āĨ⤰) whenever text is drawn through a registered font.
- Word-wrap fix â a single word/token wider than the line now breaks at character boundaries instead of overflowing.
- New
docs/custom-fonts.mdguide and a new Hindi-language report sample.
v1.5.1 - July 10, 2026
- .NET 10 target â the library now multi-targets
net8.0,net9.0, andnet10.0(the current LTS). No API or behaviour changes; existing .NET 8/9 consumers are unaffected. - Test suite now runs once per supported runtime; CI consolidated into a single workflow with the .NET 8/9/10 SDKs.
v1.5.0 - July 9, 2026
- Code128 (Subset B) barcodes via
container.Barcode(data, ...), with optional caption, custom colour, and a configurable quiet zone. - ISO/IEC 18004 QR codes via
container.QrCode(data, ...)â from-scratch generator with automatic version selection (1-40), all four error correction levels, and Reed-Solomon error correction. - Both render as vector-filled rectangles â crisp at any zoom, placeable inside any
Column,Row, orTablecell. - New
PdfPage.AddFilledRectsbatch primitive for efficient rendering of symbols with thousands of modules.
v1.4.0 - July 4, 2026
- AES-256 PDF encryption by default (Revision 6, PDF 2.0), with AES-128 available as a legacy opt-in via
EncryptionOptions.Algorithm. - Images from
byte[]andStreamsources, with format auto-detection, PNG transparency, and deduplication. - Anchor-based bookmarks (
container.Bookmark("Title")) with corrected, zoom-retaining/XYZdestinations. - Paragraphs now split across pages instead of overflowing; decorators repeat correctly on every page.
FontFamily()now actually selects Helvetica, Times, or Courier; multi-spanSpan()callback changed toFunc<TextStyle, TextStyle>.- Flate-compressed, streamed serialization for smaller files and lower peak memory.
v1.3.0 - May 19, 2026
- AES-128 PDF encryption using the PDF Standard Security Handler.
- User and owner passwords for open access and full-access recovery.
PdfPermissionsflags for print, copy, edit, forms, accessibility, assembly, and low-resolution printing.- Encrypted content streams and image XObjects with reliability fixes for trailer IDs, stream filters, and AES padding.
v1.2.3 - Recent graphics and encoding update
- Vector Graphics Canvas API for lines, rectangles, rounded rectangles, circles, ellipses, paths, polygons, grids, and charts.
- WinAnsiEncoding documentation and showcase sample covering Windows-1252 specials and Latin-1 characters.
- Improved sample output for vector graphics and Unicode character coverage.
v1.2.2 â May 4, 2026
- â Table of Contents generation with clickable internal links
- â Internal links (GoTo) with zoom preservation
- â Section headings H1-H6 with default styles
- â Fixed TOC page numbering and heading recorder propagation
v1.2.1 â May 3, 2026
- â Documentation corrections and API updates
- â Fixed color values and added missing shades
- â Improved API method documentation
v1.2.0 â July 14, 2025
- â Underline styling
- â Configurable line-height multiplier
- â Rounded borders and filled rounded boxes
- â Per-edge borders
- â Explicit page breaks
- â Hyperlink URI annotations
- â Fixed per-span style isolation
đ License
TerraPDF is released under the MIT License â a permissive open-source license that allows:
- Commercial use
- Modification and distribution
- Private use
- No warranty (as-is)
Ready to start building?
Add TerraPDF to your project and create amazing PDFs today.