Skip to main content

2 posts tagged with "Razor"

View All Tags

HTML to PDF in C#/.NET with iText 7

· 17 min read
Michał Szymanowski
Michał Szymanowski
PDFBolt Co-Founder

Convert HTML to PDF using iText 7 in C#/.NET

Need to generate professional PDFs from HTML in C# applications? This comprehensive guide shows you how to implement iText 7 for .NET – the modern, redesigned successor to iTextSharp – with Razor templating for dynamic document generation. Learn to create pixel-perfect invoices, reports, and business documents with precise layout control, leveraging iText 7's clean API and powerful HTML to PDF conversion capabilities through practical, ready-to-use code examples.

How to Convert HTML to PDF in C# and .NET Using PuppeteerSharp

· 16 min read
Michał Szymanowski
Michał Szymanowski
PDFBolt Co-Founder

Guide to generating PDF from HTML using PuppeteerSharp in C#/.NET

Looking for a reliable way to convert HTML to PDF in C# and .NET? This guide will show you how to use PuppeteerSharp, the powerful .NET port of the Node.js Puppeteer library, to generate high-quality PDFs from dynamic HTML content. Whether you're building invoices, reports, or print-ready web pages, PuppeteerSharp gives you full control over headless Chromium rendering, enabling pixel-perfect PDF output using modern HTML and CSS. We’ll walk you through setting up a C#/.NET project, using a template engine for dynamic content, and exporting a professional invoice PDF as the final result.