Scryber.Core is an open-source .NET PDF engine, written entirely in C#, that converts HTML templates into dynamic PDF documents with CSS styling, Handlebars-style data binding, and SVG graphic support. It runs on the .NET platform, including Blazor WebAssembly, and is distributed as NuGet packages for console, GUI, and ASP.NET MVC applications.
What is Scryber.Core?
Scryber.Core is a PDF creation library for .NET that takes XHTML or HTML templates as input and produces PDF files as output. It parses documents into a complete object graph that can be loaded from file paths, streams, or dynamically created strings. The engine is entirely written in C# and supports both synchronous and asynchronous output to files, memory streams, or custom streams. It is available as the scryber.core NuGet package for base libraries and the scryber.core.mvc package for ASP.NET MVC extensions.
Key Features
Scryber.Core bundles a large set of document-generation capabilities into a single library. Below are the standout capabilities you can rely on.
- HTML template definition — Use standard (X)HTML to define document structure, with support for head, body, styles, links, and standard document attributes like meta and title.
- Handlebars data binding — Bind values with
{{name}}syntax, support complex expressions, loops with#each, conditionals with#if, and nested template injection. - CSS styling and layout — Apply styles through linked, embedded, or inline CSS, including calc expressions, relative units, page sizes, headers/footers, columnar layout, flexbox, and grid.
- Graphic support — Render PNG, JPEG, TIFF, GIF, SVG, and WebP (v9.5+) images, including data URIs, and bind SVG inline with dynamic content.
- Font embedding — Includes 16 standard fonts that can be embedded, and supports custom fonts and Google Fonts via the
@font-facerule. - Existing PDF modification — Use framesets to insert pages, overlay content, or contract pages from an existing PDF, with options for page ranges and overlays.
- Security and encryption — Set owner/user passwords and control permissions such as copying, printing, and accessibility through meta tags or RenderOptions.
- Blazor WASM support — Run PDF generation entirely in the browser via Blazor WebAssembly.
Who is it for?
Scryber.Core is aimed at .NET developers who need programmatic PDF generation with template-based design. The following roles get the most benefit.
- .NET developers who need to generate PDF reports, invoices, or dynamic documents from HTML templates with data binding.
- ASP.NET MVC developers who want to return PDFs directly from controller actions using the
PDFAsyncextension method. - Blazor WebAssembly developers who need client-side PDF generation without a server round-trip.
Use Cases
The engine's template and binding model adapts to several document types. These are the most concrete scenarios where it fits naturally.
- Reporting: Build formatted, paginated reports by loading data from APIs or object models into the Params dictionary and binding them into HTML templates.
- Document generation: Create invoices, statements, or certificates with headers, footers, and column layout specified in CSS.
- Document processing: Overlay proof watermarks or insert summary pages into existing PDFs using framesets with page ranges.
- SVG drawing and charts: Embed SVG graphics inline, bound to data, for producing charts and drawings inside PDF output.
How does Scryber.Core work?
The workflow runs in three steps: define a template, bind data, and output the PDF. First, write an HTML or XHTML template with Handlebars expressions for dynamic content. Then load it with Document.ParseDocument and populate the Params dictionary with object data, JSON, or other values. Finally, call SaveAsPDF or SaveAsPDFAsync to write the document to a file or stream.
FAQ
Is Scryber.Core free?
Scryber.Core is distributed as open-source on GitHub with 270 stars, and it is downloadable via NuGet packages. No licensing or pricing details are stated on the repository page.
What input formats does Scryber.Core support?
Scryber.Core parses XHTML and HTML documents, including non-formal HTML through ParseHtmlDocument. It also supports inline and embedded SVG, and can attach external files or streams.
Can Scryber.Core modify existing PDFs?
Yes. Using the frameset element, you can combine PDF pages with HTML content, insert pages, create overlays, and specify page ranges from an existing PDF.
Does Scryber.Core support Blazor WebAssembly?
Yes, the engine explicitly supports Blazor WASM, allowing PDF generation to run in the browser using .NET. The same core library is used for console, GUI, and MVC applications.




