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 | 1.4.0 (July 4, 2026) |
| Downloads | View on NuGet |
| Target Frameworks | .NET 8, .NET 9 |
| 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 test
Requirements
- .NET 8 SDK or later (includes .NET 9 SDK)
- 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:
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.