QuestPDF 2022.5.0

.NET 6.0 .NET Core 2.0 .NET Standard 2.0 .NET Framework 4.6.2
Install-Package QuestPDF -Version 2022.5.0
dotnet add package QuestPDF --version 2022.5.0
<PackageReference Include="QuestPDF" Version="2022.5.0" />
For projects that support PackageReference, copy this XML node into the project file to reference the package.
paket add QuestPDF --version 2022.5.0
The NuGet Team does not provide support for this client. Please contact its maintainers for support.
#r "nuget: QuestPDF, 2022.5.0"
#r directive can be used in F# Interactive, C# scripting and .NET Interactive. Copy this into the interactive tool or source code of the script to reference the package.
// Install QuestPDF as a Cake Addin
#addin nuget:?package=QuestPDF&version=2022.5.0

// Install QuestPDF as a Cake Tool
#tool nuget:?package=QuestPDF&version=2022.5.0
The NuGet Team does not provide support for this client. Please contact its maintainers for support.

Dotnet GitHub Repo stars Nuget version Nuget download License Sponsor project

QuestPDF is an open-source .NET library for PDF documents generation.

It offers a layout engine designed with a full paging support in mind. The document consists of many simple elements (e.g. border, background, image, text, padding, table, grid etc.) that are composed together to create more complex structures. This way, as a developer, you can understand the behavior of every element and use them with full confidence. Additionally, the document and all its elements support paging functionality. For example, an element can be moved to the next page (if there is not enough space) or even be split between pages like table's rows.

Documentation

Getting started tutorial A short and easy to follow tutorial showing how to design an invoice document under 200 lines of code.

API reference A detailed description of behavior of all available components and how to use them with C# Fluent API.

Patterns and Practices Everything that may help you designing great reports and create reusable code that is easy to maintain.

Simplicity is the key

How easy it is to start and prototype with QuestPDF? Really easy thanks to its minimal API! Please analyse the code below:

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

// code in your main method
Document.Create(container =>
{
    container.Page(page =>
    {
        page.Size(PageSizes.A4);
        page.Margin(2, Unit.Centimetre);
        page.Background(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");

And compare it to the produced PDF file:

invoice

Are you ready for more?

The Fluent API of QuestPDF scales really well. It is easy to create and maintain even most complex documents. Read the Getting started tutorial to learn QuestPDF basics and implement an invoice under 200 lines of code. You can also investigate and play with the code from the example repository.

invoice

Product Versions
.NET net5.0 net5.0-windows net6.0 net6.0-android net6.0-ios net6.0-maccatalyst net6.0-macos net6.0-tvos net6.0-windows
.NET Core netcoreapp2.0 netcoreapp2.1 netcoreapp2.2 netcoreapp3.0 netcoreapp3.1
.NET Standard netstandard2.0 netstandard2.1
.NET Framework net461 net462 net463 net47 net471 net472 net48
MonoAndroid monoandroid
MonoMac monomac
MonoTouch monotouch
Tizen tizen40 tizen60
Xamarin.iOS xamarinios
Xamarin.Mac xamarinmac
Xamarin.TVOS xamarintvos
Xamarin.WatchOS xamarinwatchos
Compatible target framework(s)
Additional computed target framework(s)
Learn more about Target Frameworks and .NET Standard.

NuGet packages (1)

Showing the top 1 NuGet packages that depend on QuestPDF:

Package Downloads
Verify.QuestPDF The ID prefix of this package has been reserved for one of the owners of this package by NuGet.org.

Extends Verify (https://github.com/VerifyTests/Verify) to allow verification via QuestPDF.

GitHub repositories

This package is not used by any popular GitHub repositories.

Version Downloads Last updated
2022.5.0 3,039 5/9/2022
2022.4.1 7,224 4/8/2022
2022.4.0 4,608 4/4/2022
2022.4.0-alpha1 63 3/27/2022
2022.4.0-alpha0 35 3/27/2022
2022.3.1 16,874 3/15/2022
2022.3.0 517 3/14/2022
2022.2.7 682 3/12/2022
2022.2.6 1,870 3/8/2022
2022.2.5 4,811 2/18/2022
2022.2.4 67 2/18/2022
2022.2.3 3,609 2/7/2022
2022.2.2 709 2/1/2022
2022.2.1 577 1/30/2022
2022.2.0 276 1/29/2022
2022.2.0-beta1 66 1/24/2022
2022.1.0 6,250 1/10/2022
2022.1.0-beta5 258 1/7/2022
2022.1.0-beta4 64 1/6/2022
2022.1.0-beta3 66 1/5/2022
2022.1.0-beta2 58 1/5/2022
2022.1.0-beta1 65 1/3/2022
2022.1.0-beta0 60 12/30/2021
2022.1.0-alpha0 74 12/30/2021
2021.12.0 9,923 12/6/2021
2021.12.0-alpha1 880 11/29/2021
2021.12.0-alpha0 124 11/18/2021
2021.11.4 6,850 11/14/2021
2021.11.3 1,835 11/7/2021
2021.11.0-beta3 120 11/3/2021
2021.11.0-beta2 168 10/28/2021
2021.11.0-beta 223 10/23/2021
2021.10.1 4,353 9/30/2021
2021.10.0 205 9/30/2021
2021.10.0-beta.2 123 9/14/2021
2021.10.0-beta 157 9/13/2021
2021.9.3 1,535 9/12/2021
2021.9.2 249 9/1/2021
2021.9.1 143 9/1/2021
2021.9.0 136 8/30/2021
2021.8.0 1,828 8/2/2021
2021.5.2 1,569 5/5/2021
2021.4.0 348 4/2/2021
2021.3.1 6,052 3/1/2021
2021.3.0 160 3/1/2021
2021.2.0 169 2/8/2021
2021.1.0 201 1/4/2021
2020.11.0 2,097 11/1/2020

- Implemented the DynamicComponent element (useful when you want to generate dynamic and conditional content that is page aware, e.g. per-page totals),
- Extended text rendering capabilities by adding subscript and superscript effects,
- Improved table rendering performance,
- Previewer tool stability fixes.