Runnable C# examples for IronPDF, a .NET PDF library that converts HTML to PDF and generates, edits, and extracts PDF content.
dotnet add package IronPdfusing IronPdf;
var renderer = new ChromePdfRenderer();
var pdf = renderer.RenderHtmlAsPdf("<h1>Hello, PDF!</h1>");
pdf.SaveAs("hello.pdf");That produces a working PDF on the first run. To render from other sources, swap RenderHtmlAsPdf for RenderUrlAsPdf(url), RenderHtmlFileAsPdf(path), or use ImageToPdfConverter.ImageToPdf(image).
For production use, set a license key via License.LicenseKey = "YOUR-KEY". Without one, generated PDFs include a watermark.
Each folder contains a self-contained .NET project you can open and run:
examples/— focused snippets demonstrating individual featuresget-started/— minimal first projects covering installation and basic renderinghow-to/— task-oriented guides for specific PDF operationsquickstart/— end-to-end project scaffoldstutorials/— longer walkthroughs combining multiple featuresIronPdf.AI/— examples integrating IronPDF with RAG and AI document workflowsIronPdf.AndroidDemo/— server-side IronPDF deployment for use by Android clients
- HTML, URL, and image to PDF conversion
- Merging, splitting, and rearranging existing PDFs
- Headers, footers, watermarks, and page numbering
- Digital signatures and PDF/A compliance
- Password protection and security metadata
- Form filling and form data extraction
- Rendering PDFs from ASP.NET Core, Blazor, and .NET MAUI
.NET 8, 7, 6, 5, .NET Core, .NET Standard, and .NET Framework. Windows, macOS, Linux, Docker, Azure, and AWS Lambda. See the installation docs for environment-specific notes.
- Full documentation: ironpdf.com/docs
- API reference: ironpdf.com/object-reference/api
- Issues with these examples: file directly on this repository
- Product support: support@ironsoftware.com
This repository is maintained by Iron Software. IronPDF is a commercial library — see licensing for terms and trial details.