ShreePdf 1.6.0
See the version list below for details.
dotnet add package ShreePdf --version 1.6.0
NuGet\Install-Package ShreePdf -Version 1.6.0
<PackageReference Include="ShreePdf" Version="1.6.0" />
<PackageVersion Include="ShreePdf" Version="1.6.0" />
<PackageReference Include="ShreePdf" />
paket add ShreePdf --version 1.6.0
#r "nuget: ShreePdf, 1.6.0"
#:package ShreePdf@1.6.0
#addin nuget:?package=ShreePdf&version=1.6.0
#tool nuget:?package=ShreePdf&version=1.6.0
<div align="center">
<img src="logo.png" width="380" alt="ShreePdf Engine Logo"><br><br>
โก ShreePdf Engine
Radiant Aesthetics. Intelligent PDF Engineering for the AI Era.
A next-generation C# PDF document generation library featuring universal Markdown ingestion, anti-orphan page budgeting, AI/RAG dual-stream metadata embedding, out-of-the-box themes, and SkiaSharp vector rendering.
</div>
๐ 4 Core Innovations of ShreePdf
1. ๐ค Universal Markdown & HTML Ingestion Engine
Render LLM outputs (GPT-4o, Claude, Gemini) and HTML/Razor views directly into PDF document AST without HTML wrappers or headless browser overhead.
var doc = Document.FromMarkdown(llmMarkdownText, ThemePresets.GlassmorphicDark);
doc.AddHtml("<h1 style='color:#a855f7;'>Razor & HTML View Support</h1>");
2. ๐ Anti-Orphan Smart Auto-Fit Budgeter
Eliminates 1.05-page documents spilling 1โ3 orphan lines onto a blank second page. It dynamically micro-adjusts typography spacing, line heights, and padding by 5โ12% to fit content cleanly on 1 page.
doc.EnableAutoFit(true);
3. ๐ง AI / RAG Dual-Stream Metadata Embedder
Embeds a structured JSON AST directly inside the PDF binary metadata stream (RagMetadataManager). Downstream AI agents and vector databases extract data with 100% loss-free accuracy without OCR.
// Extract loss-free AST JSON directly from PDF bytes
string astJson = RagMetadataManager.ExtractAstJsonFromPdfBytes(pdfBytes);
4. ๐จ Out-of-the-Box Modern Theme Engine
Eliminates ugly default PDFs by bundling modern themes (ThemePresets.SaaSAnalytics, ExecutiveMinimal, GlassmorphicDark).
doc.WithTheme(ThemePresets.SaaSAnalytics);
๐งช Quality Assurance & Test Coverage Dashboard
ShreePdf features an extensive unit test suite verifying layout math, color models, HTML tag parsing, and cryptographic security.
| Test Category | Covered Components | Test Count | Status |
|---|---|---|---|
| ๐ Document & Fluent API | Page sizes (A4โB5), margins, themes, text elements, font scaling | 74 | โ 100% Passed |
| ๐ Visual Components & Widgets | KPI Stat Cards, DataGrid pagination, status badges, stress tests | 51 | โ 100% Passed |
| ๐ Layout & Auto-Fit Budgeter | Page budgeting, orphan squeeze algorithm, height measurement | 44 | โ 100% Passed |
| ๐จ Color & Theme Engine | Hex formats (#abc, #rrggbb, #aarrggbb), RGB, RGBA, themes |
40 | โ 100% Passed |
| ๐ค Markdown Ingestion | Headers h1โh6, blockquotes, tables, bullet lists, formatting tags | 40 | โ 100% Passed |
| ๐ ASP.NET Core & HTML Middleware | HTML tag parsing, inline CSS styles, Razor views, PdfResult |
33 | โ 100% Passed |
| ๐ก๏ธ Licensing & Security Engine | HMAC-SHA256 signatures, RSA keys, tier capabilities, watermarks | 19 | โ 100% Passed |
| ๐ง AI / RAG Dual-Stream Metadata | JSON AST serialization, metadata stream injection, round-trip checks | 15 | โ 100% Passed |
| ๐งฉ Phase 2.5 Features (P0โP2) | Images, hyperlinks, lists, page numbers, landscape, watermarks, table splitting, async, templating, per-cell styling, streaming | 63 | โ 100% Passed |
| Total Test Suite | Full Solution Suite | 379 | โ ALL PASSED |
๐ป Quickstart
using ShreePdf.Fluent;
using ShreePdf.Licensing;
using ShreePdf.Metadata;
using ShreePdf.Web;
// 1. Set License
LicenseManager.SetLicenseKey("SHREE-ENTERPRISE-...");
// 2. Ingest Markdown, Add HTML & Apply Dark Theme
string llmText = "# Quarterly Review\n> Loss-free RAG indexing enabled.\n- Fast SkiaSharp rendering";
var doc = Document.FromMarkdown(llmText, ThemePresets.GlassmorphicDark)
.AddHtml("<p style='color:#10b981; font-weight:bold;'>ASP.NET Core Razor Middleware Ready</p>")
.EnableAutoFit(true)
.EnableRagMetadata(true);
// 3. Export PDF & Extract RAG JSON
byte[] pdfBytes = doc.GenerateBytes();
string ragJson = RagMetadataManager.ExtractAstJsonFromPdfBytes(pdfBytes);
doc.Save("Report.pdf");
๐งช Running Tests & Samples
# Build Solution
dotnet build
# Run Full 316-Test Suite
dotnet test
# Run AI Showcase Console Application
dotnet run --project samples/ShreePdf.ConsoleSample
<div align="center">
Developed with โค๏ธ under jjopensoftworks-blip
</div>
| Product | Versions Compatible and additional computed target framework versions. |
|---|---|
| .NET | net9.0 is compatible. net9.0-android was computed. net9.0-browser was computed. net9.0-ios was computed. net9.0-maccatalyst was computed. net9.0-macos was computed. net9.0-tvos was computed. net9.0-windows was computed. net10.0 was computed. net10.0-android was computed. net10.0-browser was computed. net10.0-ios was computed. net10.0-maccatalyst was computed. net10.0-macos was computed. net10.0-tvos was computed. net10.0-windows was computed. |
-
net9.0
- SkiaSharp (>= 4.151.0)
- SkiaSharp.NativeAssets.Linux.NoDependencies (>= 4.151.0)
NuGet packages
This package is not used by any NuGet packages.
GitHub repositories
This package is not used by any popular GitHub repositories.
| Version | Downloads | Last Updated |
|---|---|---|
| 1.16.0 | 95 | 8/25/2026 |
| 1.15.0 | 94 | 8/23/2026 |
| 1.14.0 | 99 | 8/19/2026 |
| 1.13.0 | 87 | 8/19/2026 |
| 1.12.0 | 84 | 8/19/2026 |
| 1.11.0 | 106 | 8/17/2026 |
| 1.10.0 | 102 | 8/15/2026 |
| 1.9.0 | 103 | 8/9/2026 |
| 1.8.0 | 97 | 8/9/2026 |
| 1.7.0 | 94 | 8/6/2026 |
| 1.6.0 | 112 | 8/4/2026 |
| 1.5.0 | 101 | 8/6/2026 |
| 1.3.0 | 110 | 8/1/2026 |
| 1.0.0 | 100 | 7/31/2026 |