QuestPDF 2025.12.2

QuestPDF - Modern PDF library for C# developers

QuestPDF is a production-ready library that lets you design documents the way you design software: with clean, maintainable, strong-typed C# code. Stop fighting with HTML-to-PDF conversion. Build pixel-perfect reports, invoices, and exports using the language and tools you already love.

GitHub Stars and Stargazers

Nuget package download

QuestPDF License


Home Page

Quick Start

Real-world Invoice Tutorial

Features Overview

License

NuGet


🚀 Quick start

Learn how easy it is to design, implement and generate PDF documents using QuestPDF. Effortlessly create documents of all types such as invoices and reports.

using QuestPDF.Fluent;
using QuestPDF.Helpers;
using QuestPDF.Infrastructure;

// set your license here:
// QuestPDF.Settings.License = LicenseType.Community;

Document.Create(container =>
{
    container.Page(page =>
    {
        page.Size(PageSizes.A4);
        page.Margin(2, Unit.Centimetre);
        page.PageColor(Colors.White);
        page.DefaultTextStyle(x => x.FontSize(20));
        
        page.Header()
            .Text("Hello PDF!")
            .SemiBold().FontSize(36).FontColor(Colors.Blue.Medium);
        
        page.Content()
            .PaddingVertical(1, Unit.Centimetre)
            .Column(x =>
            {
                x.Spacing(20);
                
                x.Item().Text(Placeholders.LoremIpsum());
                x.Item().Image(Placeholders.Image(200, 100));
            });
        
        page.Footer()
            .AlignCenter()
            .Text(x =>
            {
                x.Span("Page ");
                x.CurrentPageNumber();
            });
    });
})
.GeneratePdf("hello.pdf");

The code above produces the following PDF document:

Preview of a PDF document showing the Hello World example

Quick Start Tutorial

The library is free for individuals, non-profits, all FOSS projects, and organizations under $1M in annual revenue. Read more about licensing here

Everything you need to generate PDFs

From layout and styling to production features, QuestPDF gives you the flexibility to create documents of any complexity.

🎨 Visual Content:

  • Page attributes (header, footer, background, watermark, margin),
  • Text (font style, paragraph style, page numbers),
  • Styled containers (background, border, rounded corners, colors and gradients, shadows),
  • Lines (vertical and horizontal, colors and gradients, dash pattern)
  • Images (PNG, JPG, WEBP, SVG),

🔀 Layout:

  • Tables,
  • Lists,
  • Layers,
  • Column / Row,
  • Inlined,

📐 Positional:

  • Alignment,
  • Size Controls (width / height),
  • Padding,

🛠️ Other:

  • Page Breaking Control,
  • Aspect Ratio,
  • Integrations (maps, charts, barcodes, QR codes),
  • Hyperlinks,
  • Z-index,

Explore All QuestPDF Features

Familiar Programming Patterns

Use your existing programming language and patterns to ship faster with less training.

Loops, conditionals, functions are natively supported. Leverage IntelliSense, inspections, navigation, and safe refactoring.

container.Column(column =>
{
    column.Item().Text("Order Items").Bold();

    if (Model.ShowSummary)
        column.Item().Element(ComposeOrderSummary);

    foreach (var item in Model.Items)
        column.Item().Element(c => ComposeItem(c, item));
});

Review document changes like any other code. Get clean diffs, PR approvals, and traceable history.

void ComposeItem(IContainer container, OrderItem item)
{
    container
        .Border(1, Colors.Grey.Darken2)
        .Background(item.HighlightColor)
-       .Padding(12)
+       .Padding(16)
        .Row(row =>
        {
            row.RelativeItem().Text(item.Name);
            row.AutoItem().Text($"{item.Price:F2} USD");
        });
}

Companion App

Accelerate development with live document preview and hot-reload capability. See your changes instantly without recompiling.

  • Explore PDF document hierarchy and navigate its structure
  • Quickly magnify and measure content
  • Debug runtime exceptions with stack traces and code snippets
  • Identify, understand and solve layout errors

Screenshot showing the QuestPDF Companion App

Learn about QuestPDF Companion App

Learn about QuestPDF Companion App

Enterprise-grade foundations

  • Predictable Development — Eliminate CSS debugging, browser quirks, and layout surprises common with HTML-to-PDF tools. What you code is what you get.

  • Source-available - Entire QuestPDF source code is available for review and customization, ensuring transparency and compliance with your organization's requirements.

  • Complete Data Privacy - QuestPDF runs entirely within your infrastructure with no external API calls, internet requirement, or background data collection. As a company, we do not access, collect, store, or process your private data.

  • Comprehensive Layout Engine - A powerful layout engine built specifically for PDF generation. Gain full control over document structure, precise content positioning, and automatic pagination.

  • Advanced Language Support - Create multilingual documents with full RTL language support, advanced text shaping, and bi-directional layout handling.

  • High Performance - Generate thousands of pages per second while maintaining minimal CPU and memory usage. Perfect for high-throughput enterprise applications.

  • Optimized File Size - Drastically reduce file sizes without compromising quality. Benefit from automatic font subsetting, optimal image compression, and efficient file compression.

Perform common PDF operations

Leverage a powerful C# Fluent API to create, customize, and manage your PDF documents with ease.

  • Merge documents
  • Attach files
  • Extract pages
  • Encrypt / decrypt
  • Extend metadata – Limit access
  • Optimize for Web
  • Overlay / underlay
DocumentOperation
    .LoadFile("input.pdf")
    .TakePages("1-10")
    .MergeFile("appendix.pdf", "1-z") // all pages
    .AddAttachment(new DocumentAttachment
    {
        FilePath = "metadata.xml"
    })
    .Encrypt(new Encryption256Bit
    {
        OwnerPassword = "mypassword",
        AllowPrinting = true,
        AllowContentExtraction = false
    })
    .Save("final-document.pdf");

Learn Document Operation API

Works everywhere you do

Deploy on any major operating system and integrate seamlessly with your favorite IDEs, cloud platforms, and development tools.

Platform Support
Operating Systems Windows, Linux, macOS
Frameworks .NET 6+ and .NET Framework 4.6.2+
Cloud Azure, AWS, Google Cloud, Others
Containers Docker, Kubernetes
IDEs Visual Studio, VS Code, JetBrains Rider, Others

Industry-standard PDF compliance

Generate PDF documents that meet the strictest archival and accessibility requirements. Every build is automatically validated using the open-source veraPDF and Mustang tools.

  • PDF/A (Archival):

    • Purpose: ISO 19005 standard for long-term preservation. Ensures PDFs remain readable and visually identical for decades without external dependencies.
    • Supported Standards: PDF/A-2b, PDF/A-2u, PDF/A-2a, PDF/A-3b, PDF/A-3u, PDF/A-3a
  • PDF/UA (Accessibility):

    • Purpose: ISO 14289 standard for universal accessibility. Includes full support for screen readers and assistive technologies for people with disabilities.
    • Supported Standards: PDF/UA-1
  • EN 16931 (E-Invoicing):

    • Purpose: European standard for electronic invoicing. Embeds structured invoice data (XML) within PDF documents for automated processing.
    • Supported Standards: ZUGFeRD, Factur-X

Fair and Sustainable License

A model that benefits everyone. Commercial licensing provides businesses with legal safety and long-term stability, while funding a feature-complete, unrestricted library for the open-source community.

  • Actively maintained with regular feature, quality, and security updates
  • Full source code available on GitHub
  • All features included in every tier without restrictions
  • Predictable pricing: no per-seat, per-server, or usage fees

The library is free for individuals, non-profits, all FOSS projects, and organizations under $1M in annual revenue.

QuestPDF Pricing

QuestPDF License Terms

See a real-world example

Follow our detailed tutorial and see how easy it is to generate a fully functional invoice with fewer than 250 lines of C# code.

  • Step-by-step guidance
  • Production-ready code
  • Best practices included

Preview of a PDF document being an output of the Real-World Invoice tutorial

Read Real-world Invoice Tutorial

Community QuestPDF

We are incredibly grateful to our .NET Community for their positive reviews and recommendations of the QuestPDF library. Your support and feedback are invaluable and motivate us to keep improving and expanding this project. Thank you for helping us grow and reach more developers!

Nick Chapsas: The Easiest Way to Create PDFs in .NET

Nick Chapsas The Easiest Way to Create PDFs in .NET

JetBrains: OSS Power-Ups: QuestPDF

JetBrains OSS Power-Ups: QuestPDF

No packages depend on QuestPDF.

Fixes: - Fixed semantic structure handling in the Dynamic element - Fixed semantic structure handling in the Lazy element Improvements: - Updated package icon - Updated NuGet package metadata (readme and description) - Revised welcome message to clarify licensing options and improve guidance - Updated third-party license attributions (removed ICU, added libgrapheme)

.NET 6.0

  • No dependencies.

.NET 8.0

  • No dependencies.

.NET 10.0

  • No dependencies.

.NET Standard 2.0

Version Downloads Last updated
2025.12.2 1 01/14/2026
2025.12.1 3 12/27/2025
2025.12.0 4 12/14/2025
2025.12.0-alpha4 4 11/09/2025
2025.12.0-alpha3 4 11/04/2025
2025.12.0-alpha2 5 10/10/2025
2025.12.0-alpha1 5 09/27/2025
2025.12.0-alpha0 6 09/10/2025
2025.7.4 5 11/04/2025
2025.7.3 7 10/25/2025
2025.7.2 7 09/27/2025
2025.7.1 8 09/11/2025
2025.7.0 11 07/12/2025
2025.6.0-rc0 8 06/27/2025
2025.5.1 10 06/09/2025
2025.5.0 13 05/30/2025
2025.4.4 11 06/04/2025
2025.4.3 11 06/04/2025
2025.4.2 12 06/04/2025
2025.4.1 11 06/05/2025
2025.4.0 12 06/04/2025
2025.1.7 12 06/05/2025
2025.1.6 11 06/05/2025
2025.1.5 12 06/04/2025
2025.1.4 11 06/05/2025
2025.1.3 11 06/04/2025
2025.1.2 11 06/04/2025
2025.1.1 11 06/04/2025
2025.1.0 12 06/04/2025
2025.1.0-rc0 8 06/09/2025
2025.1.0-alpha0 8 06/09/2025
2024.12.3 12 06/04/2025
2024.12.2 11 06/04/2025
2024.12.1 11 06/04/2025
2024.12.0 11 06/04/2025
2024.12.0-rc3 9 06/07/2025
2024.12.0-rc2 10 06/06/2025
2024.12.0-rc1 9 06/07/2025
2024.12.0-rc0 11 06/06/2025
2024.10.4 12 06/04/2025
2024.10.3 12 06/04/2025
2024.10.2 12 06/04/2025
2024.10.1 11 06/04/2025
2024.10.0 11 06/04/2025
2024.10.0-rc4 9 06/07/2025
2024.10.0-rc3 9 06/07/2025
2024.10.0-rc2 10 06/06/2025
2024.10.0-rc1 9 06/07/2025
2024.10.0-rc0 11 06/04/2025
2024.7.3 11 06/04/2025
2024.7.2 12 06/04/2025
2024.7.1 12 06/05/2025
2024.7.0 11 06/04/2025
2024.7.0-rc0 9 06/10/2025
2024.6.4 12 06/04/2025
2024.6.3 11 06/04/2025
2024.6.2 11 06/04/2025
2024.6.1 12 06/05/2025
2024.6.0 11 06/04/2025
2024.3.10 12 06/04/2025
2024.3.9 11 06/04/2025
2024.3.8 11 06/04/2025
2024.3.7 11 06/04/2025
2024.3.6 12 06/04/2025
2024.3.5 13 06/04/2025
2024.3.4 11 06/04/2025
2024.3.3 11 06/04/2025
2024.3.2 12 06/04/2025
2024.3.1 11 06/04/2025
2024.3.0 14 06/04/2025
2024.3.0-rc2 8 06/09/2025
2024.3.0-rc1 8 06/09/2025
2024.3.0-rc 9 06/07/2025
2024.3.0-beta1 9 06/11/2025
2024.3.0-beta 9 06/09/2025
2024.3.0-alpha 8 06/09/2025
2023.12.6 11 06/04/2025
2023.12.5 11 06/04/2025
2023.12.4 11 06/04/2025
2023.12.3 11 06/04/2025
2023.12.2 11 06/04/2025
2023.12.1 11 06/04/2025
2023.12.0 11 06/04/2025
2023.10.2 10 06/04/2025
2023.10.1 12 06/04/2025
2023.10.0 12 06/04/2025
2023.10.0-alpha0 9 06/14/2025
2023.9.1 12 06/04/2025
2023.9.0 12 06/04/2025
2023.6.3 12 06/04/2025
2023.6.2 10 06/04/2025
2023.6.1 11 06/04/2025
2023.6.0 11 06/04/2025
2023.5.3 11 06/04/2025
2023.5.2 11 06/04/2025
2023.5.1 11 06/04/2025
2023.5.0 11 06/04/2025
2023.4.2 12 06/04/2025
2023.4.1 12 06/04/2025
2023.4.0 12 06/04/2025
2022.12.15 12 06/04/2025
2022.12.14 11 06/04/2025
2022.12.13 11 06/04/2025
2022.12.12 12 06/04/2025
2022.12.11 11 06/04/2025
2022.12.10 11 06/04/2025
2022.12.9 11 06/04/2025
2022.12.8 11 06/04/2025
2022.12.7 11 06/04/2025
2022.12.6 11 06/04/2025
2022.12.5 11 06/04/2025
2022.12.4 11 06/04/2025
2022.12.3 12 06/04/2025
2022.12.2 11 06/04/2025
2022.12.1 11 06/04/2025
2022.12.0 11 06/04/2025
2022.11.0 12 06/04/2025
2022.11.0-alpha1 9 06/09/2025
2022.11.0-alpha0 8 06/09/2025
2022.9.1 12 06/04/2025
2022.9.0 12 06/04/2025
2022.9.0-alpha1 8 06/09/2025
2022.8.2 11 06/04/2025
2022.8.1 11 06/04/2025
2022.8.0 11 06/04/2025
2022.6.3 12 06/04/2025
2022.6.2 12 06/04/2025
2022.6.1 11 06/04/2025
2022.6.0 11 06/04/2025
2022.6.0-prerelease 8 06/09/2025
2022.5.0 11 06/04/2025
2022.4.1 12 06/04/2025
2022.4.0 12 06/04/2025
2022.4.0-alpha1 9 06/09/2025
2022.4.0-alpha0 9 06/12/2025
2022.3.1 11 06/04/2025
2022.3.0 12 06/04/2025
2022.2.7 12 06/04/2025
2022.2.6 11 06/04/2025
2022.2.5 12 06/04/2025
2022.2.4 12 06/04/2025
2022.2.3 11 06/04/2025
2022.2.2 12 06/04/2025
2022.2.1 12 06/04/2025
2022.2.0 12 06/04/2025
2022.2.0-beta1 8 06/09/2025
2022.1.0 12 06/04/2025
2022.1.0-beta5 8 06/09/2025
2022.1.0-beta4 8 06/11/2025
2022.1.0-beta3 10 06/09/2025
2022.1.0-beta2 10 06/09/2025
2022.1.0-beta1 10 06/09/2025
2022.1.0-beta0 8 06/09/2025
2022.1.0-alpha0 9 06/12/2025
2021.12.0 11 06/04/2025
2021.12.0-alpha1 10 06/14/2025
2021.12.0-alpha0 9 06/09/2025
2021.11.4 11 06/04/2025
2021.11.3 11 06/04/2025
2021.11.0-beta3 10 06/09/2025
2021.11.0-beta2 10 06/09/2025
2021.11.0-beta 8 06/09/2025
2021.10.1 12 06/04/2025
2021.10.0 11 06/04/2025
2021.10.0-beta.2 10 06/09/2025
2021.10.0-beta 9 06/09/2025
2021.9.3 12 06/04/2025
2021.9.2 12 06/04/2025
2021.9.1 12 06/04/2025
2021.9.0 12 06/04/2025
2021.8.0 13 06/04/2025
2021.5.2 11 06/04/2025
2021.4.0 12 06/04/2025
2021.3.1 12 06/04/2025
2021.3.0 11 06/04/2025
2021.2.0 12 06/04/2025
2021.1.0 12 06/04/2025
2020.11.0 10 06/04/2025