MIT Free for personal and commercial use. No licensing fees for private or commercial .NET apps. License

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
View on NuGet.org v2.0.0 Download

Package Information

Package IDTerraPDF
Latest Version2.0.0 (July 23, 2026)
DownloadsView on NuGet
Target Frameworks.NET 8, .NET 9, .NET 10
DependenciesNone — zero dependencies
LicenseMIT

🔗 Quick Links

GitHub Repository

Source code, issues, pull requests, and community discussions.

github.com/sahebansari/TerraPDF →

Documentation

Complete guides, API reference, and examples.

Browse docs →

Releases

Download release binaries and check release notes.

View releases →

Report Issues

Found a bug? Have a feature request? Let us know.

Open an issue →

🔨 Build from Source

Prefer to build from source? Clone and compile TerraPDF yourself:

Terminal
git clone https://github.com/sahebansari/TerraPDF.git
cd TerraPDF
dotnet build
dotnet test

Requirements

  • .NET 10 SDK (the repository's global.json requires 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 a Type0/CIDFontType2 composite font with Identity-H encoding, 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.md guide 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, and net10.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, or Table cell.
  • New PdfPage.AddFilledRects batch 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[] and Stream sources, with format auto-detection, PNG transparency, and deduplication.
  • Anchor-based bookmarks (container.Bookmark("Title")) with corrected, zoom-retaining /XYZ destinations.
  • Paragraphs now split across pages instead of overflowing; decorators repeat correctly on every page.
  • FontFamily() now actually selects Helvetica, Times, or Courier; multi-span Span() callback changed to Func<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.
  • PdfPermissions flags 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

View full changelog →

📄 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)

Read the full license →

Ready to start building?

Add TerraPDF to your project and create amazing PDFs today.

Read the Guide NuGet Package