Runnable C# samples and the complete demo application for EvoPdf Next, the .NET PDF library: HTML, Word, Excel, RTF and Markdown to PDF, PDF to text, search, images, PDF creation and editing, PDF/UA and PDF/A.
| Folder | What it is | How to use it |
|---|---|---|
quickstarts/ |
27 minimal samples, one feature each, shared by one .NET 10 console project per platform | dotnet run --project Quickstarts_<Platform>.csproj -- <SampleName>: the fastest way to see a feature work |
docs-samples/ |
The 569 code samples of 112 documentation topics, verbatim, each file in its own language (C#, shell, Dockerfile, HTML, XML, YAML, JSON) and linked to its topic | Copy into your project; read the topic for the explanation |
demo/ |
The demo applications from the official download package: the ASP.NET Core demo that runs at evopdf.com with the source of every demo page, plus the console demo; one source tree each, a project per platform | open the platform solution and run |
classic-demo/ |
The Classic demo application on the Next engine: the ASP.NET Core demo of EvoPdf Classic (EvoPdf namespace) on the EvoPdf.HtmlToPdf.<Platform> packages, the Classic API rendered by the Chromium engine of EvoPdf Next; a project per platform |
open the platform solution and run; see classic-demo/README.md |
All samples use the current API (EvoPdf.Next namespace, version 15.0) and read the license key from the EVOPDF_LICENSE_KEY environment variable; without it they run in demo mode (watermarked output).
git clone https://github.com/EvoPdf/evopdf-next-samples
cd evopdf-next-samples/quickstarts
dotnet run --project Quickstarts_Windows.csproj -- HtmlToPdf.Basic https://www.evopdf.com # or _Linux, _MacOS, _Windows.Arm64, ...
dotnet run --project Quickstarts_Windows.csproj # lists the sample namesThe samples (quickstarts/Samples/<Name>.cs) are shared by seven platform projects in the same folder (Quickstarts_<Platform>.csproj), one per NuGet package, each with its own obj/bin: the same layout as the demo applications. One project per platform keeps the build small: the package copies the native rendering runtimes into the output folder of every project that references it. Each sample file is self-contained; copy Run into your own project.
Every sample runs without arguments: the input documents (Files/: the Word, Excel, RTF, Markdown and PDF documents of the demo application, a Factur-X invoice with its HTML page, the signature fields page and the sample certificate of the demo) are copied next to the executable, and results are written to an output folder there. Pass your own file or URL as the argument to convert something else: Quickstarts.exe WordToPdf C:\docs\report.docx.
| Project | Shows |
|---|---|
HtmlToPdf.Basic |
Convert a URL and an HTML string to PDF |
HtmlToPdf.PageSetup |
The page layouts: A4 with the desktop layout of the page, a template at the page width, Save as PDF in Chrome, a receipt on one page, a page as wide as the browser window |
HtmlToPdf.HeadersFooters |
HTML header and footer with page numbers |
HtmlToPdf.DynamicContent |
Wait for JavaScript content: conversion delay and manual triggering |
HtmlToPdf.RenderingModes |
The persistent renderer process: global settings, start before the first conversion, replacements and status |
HtmlToPdf.Parallel |
Convert several URLs in parallel and merge them into one PDF |
HtmlToPdf.Standards |
PDF/UA and PDF/A output |
HtmlToPdf.Security |
Passwords, permissions and document metadata |
HtmlToPdf.DigitalSignature |
PAdES digital signature with a visible appearance; B-B, or B-T with a timestamp server URL as second argument |
HtmlToPdf.ElectronicInvoice |
Factur-X / ZUGFeRD electronic invoice: the invoice page from HTML with the invoice XML embedded, PDF/A-3 and PDF/UA-1 |
HtmlToImage |
HTML page to PNG screenshot |
WordToPdf |
Word DOCX to PDF |
ExcelToPdf |
Excel XLSX to PDF |
RtfToPdf |
RTF to PDF |
MarkdownToPdf |
Markdown to PDF |
PdfProcessor.PdfToText |
Extract text from a PDF, original layout or reading order |
PdfProcessor.FindText |
Search text in a PDF and print the position of every match |
PdfProcessor.PdfToImage |
Render PDF pages to PNG images |
PdfProcessor.ExtractImages |
Extract the images embedded in a PDF |
PdfEditor.Stamp |
Stamp an existing PDF with an HTML template |
PdfEditor.SignatureFields |
Signature fields where the HTML page marks each signer, then the first field signed |
PdfDocument.MultipleHtml |
Several HTML documents rendered one after the other in one PDF with PdfDocument.AddHtml |
PdfEditor.EditPages |
Insert a cover page with HTML content, rotate a page and add a bookmark in an existing PDF |
PdfEditor.FillForm |
Create a PDF form from code, then fill it in an existing document; flatten as argument makes the fields static |
PdfMerge.PageRanges |
Merge documents, a blank page and selected pages, with bookmarks for the parts |
PdfSplit |
Extract pages by page ranges and split a PDF into single page documents |
PdfRedactor.Redact |
Permanently remove a name, email addresses, phone numbers and IBANs from a PDF |
- ASP.NET Core demo: run it from Visual Studio (open the platform solution, set
EvoPdf_Next_AspNetDemo_<Platform>as startup project, F5) or from the CLI in its project folder (dotnet run --project EvoPdf_Next_AspNetDemo_<Platform>.csproj), or publish it (dotnet publish -c Release -o publish) and run from thepublishfolder. Starting the executable frombindoes not work: a build does not copywwwrootthere, so styles, images and the demo input files are not found. Details indemo/README.md. - Console demo: runs straight from the build output;
EvoPdf_Next_ConsoleDemo_<Platform> /outFileName:output.pdf https://www.evopdf.com. Run it without arguments to see all the options. - Quickstarts:
Quickstarts.exe <SampleName> [input]from the build output (quickstarts/bin/<Platform>/...), ordotnet run --project Quickstarts_<Platform>.csproj -- <SampleName>; the input documents ship with the build.
| Solution | Package | Runs on |
|---|---|---|
EvoPdf.Next.Samples.Windows.sln |
EvoPdf.Next.Windows |
Windows x64 |
EvoPdf.Next.Samples.Windows.Arm64.sln |
EvoPdf.Next.Windows.Arm64 |
Windows ARM64 |
EvoPdf.Next.Samples.Linux.sln |
EvoPdf.Next.Linux |
Linux x64 |
EvoPdf.Next.Samples.Linux.Arm64.sln |
EvoPdf.Next.Linux.Arm64 |
Linux ARM64 |
EvoPdf.Next.Samples.MacOS.sln |
EvoPdf.Next.MacOS |
macOS (Apple Silicon) |
EvoPdf.Next.Samples.MultiPlatform.sln |
EvoPdf.Next |
Windows x64 + Linux x64 |
EvoPdf.Next.Samples.MultiPlatform.Arm64.sln |
EvoPdf.Next.Windows.Arm64 + EvoPdf.Next.Linux.Arm64 |
Windows ARM64 + Linux ARM64 |
Each solution holds the quickstarts, the ASP.NET Core demo, the console demo and the Classic demo on the Next engine of its platform; the Classic demo references the EvoPdf.HtmlToPdf.<Platform> packages of the same platform. The CI builds all seven on Windows, Linux and macOS runners. On Linux install the system packages first.
- EvoPdf Next documentation, All components, NuGet packages
- Download the full demo package (Windows, Linux and macOS variants, .NET 8 and .NET 10), the Classic demo on the Next engine
- Classic to Next migration guide
- Pricing & licensing, Support
The samples are MIT licensed. EvoPdf Next is commercial software with a free, time-unlimited evaluation. The demo applications contain public evaluation keys intended only to run the demos without watermarks.
