QuestPDF 2022.6.3
Install-Package QuestPDF -Version 2022.6.3
dotnet add package QuestPDF --version 2022.6.3
<PackageReference Include="QuestPDF" Version="2022.6.3" />
paket add QuestPDF --version 2022.6.3
#r "nuget: QuestPDF, 2022.6.3"
// Install QuestPDF as a Cake Addin
#addin nuget:?package=QuestPDF&version=2022.6.3
// Install QuestPDF as a Cake Tool
#tool nuget:?package=QuestPDF&version=2022.6.3
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
A short and easy to follow tutorial showing how to design an invoice document under 200 lines of code.
A detailed description of behavior of all available components and how to use them with C# Fluent API.
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:
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.
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 |
-
.NETCoreApp 2.0
- SkiaSharp (>= 2.80.4)
- SkiaSharp.HarfBuzz (>= 2.80.4)
-
.NETCoreApp 3.0
- SkiaSharp (>= 2.80.4)
- SkiaSharp.HarfBuzz (>= 2.80.4)
-
.NETFramework 4.6.2
- SkiaSharp (>= 2.80.4)
- SkiaSharp.HarfBuzz (>= 2.80.4)
-
.NETStandard 2.0
- SkiaSharp (>= 2.80.4)
- SkiaSharp.HarfBuzz (>= 2.80.4)
-
net6.0
- SkiaSharp (>= 2.80.4)
- SkiaSharp.HarfBuzz (>= 2.80.4)
NuGet packages (5)
Showing the top 5 NuGet packages that depend on QuestPDF:
Package | Downloads |
---|---|
AgentHub.Service.Financial.Domain
Package Description |
|
A2v10.Pdf.Report
A2v10 Platform PDF report |
|
Verify.QuestPDF
Extends Verify (https://github.com/VerifyTests/Verify) to allow verification via QuestPDF. |
|
A2v10.ReportEngine.Pdf
PDF report engine for A2v10 |
|
Sckf.Core.Pdf
Pdf for ASP.NET Core |
GitHub repositories
This package is not used by any popular GitHub repositories.
Version | Downloads | Last updated | |
---|---|---|---|
2022.6.3 | 5,245 | 7/18/2022 | |
2022.6.2 | 14,579 | 6/22/2022 | |
2022.6.1 | 6,205 | 6/12/2022 | |
2022.6.0 | 7,766 | 6/12/2022 | |
2022.6.0-prerelease | 586 | 5/30/2022 | |
2022.5.0 | 52,596 | 5/9/2022 | |
2022.4.1 | 16,317 | 4/8/2022 | |
2022.4.0 | 11,166 | 4/4/2022 | |
2022.4.0-alpha1 | 86 | 3/27/2022 | |
2022.4.0-alpha0 | 55 | 3/27/2022 | |
2022.3.1 | 37,172 | 3/15/2022 | |
2022.3.0 | 861 | 3/14/2022 | |
2022.2.7 | 962 | 3/12/2022 | |
2022.2.6 | 3,204 | 3/8/2022 | |
2022.2.5 | 7,333 | 2/18/2022 | |
2022.2.4 | 99 | 2/18/2022 | |
2022.2.3 | 5,951 | 2/7/2022 | |
2022.2.2 | 780 | 2/1/2022 | |
2022.2.1 | 631 | 1/30/2022 | |
2022.2.0 | 572 | 1/29/2022 | |
2022.2.0-beta1 | 82 | 1/24/2022 | |
2022.1.0 | 9,002 | 1/10/2022 | |
2022.1.0-beta5 | 502 | 1/7/2022 | |
2022.1.0-beta4 | 80 | 1/6/2022 | |
2022.1.0-beta3 | 82 | 1/5/2022 | |
2022.1.0-beta2 | 77 | 1/5/2022 | |
2022.1.0-beta1 | 83 | 1/3/2022 | |
2022.1.0-beta0 | 77 | 12/30/2021 | |
2022.1.0-alpha0 | 95 | 12/30/2021 | |
2021.12.0 | 12,943 | 12/6/2021 | |
2021.12.0-alpha1 | 901 | 11/29/2021 | |
2021.12.0-alpha0 | 141 | 11/18/2021 | |
2021.11.4 | 9,474 | 11/14/2021 | |
2021.11.3 | 2,671 | 11/7/2021 | |
2021.11.0-beta3 | 137 | 11/3/2021 | |
2021.11.0-beta2 | 185 | 10/28/2021 | |
2021.11.0-beta | 237 | 10/23/2021 | |
2021.10.1 | 5,435 | 9/30/2021 | |
2021.10.0 | 231 | 9/30/2021 | |
2021.10.0-beta.2 | 140 | 9/14/2021 | |
2021.10.0-beta | 172 | 9/13/2021 | |
2021.9.3 | 1,861 | 9/12/2021 | |
2021.9.2 | 284 | 9/1/2021 | |
2021.9.1 | 167 | 9/1/2021 | |
2021.9.0 | 159 | 8/30/2021 | |
2021.8.0 | 1,992 | 8/2/2021 | |
2021.5.2 | 1,632 | 5/5/2021 | |
2021.4.0 | 366 | 4/2/2021 | |
2021.3.1 | 6,332 | 3/1/2021 | |
2021.3.0 | 189 | 3/1/2021 | |
2021.2.0 | 196 | 2/8/2021 | |
2021.1.0 | 227 | 1/4/2021 | |
2020.11.0 | 2,662 | 11/1/2020 |
Integrated the text-shaping algorithm. This change significantly improves the Unicode compatibility. Also, it extends support for more advanced languages (e.g. Arabic) that:
1) Combine multiple text characters and display them as a single visual glyph.
2) Are displayed in the right-to-left order.
Improved the exception message when SkiaSharp throws the TypeInitializationException. On some operating systems, SkiaSharp requires additional dependencies installed as nuget packages. This change should help developers determine how to choose and install them correctly.
Fixed: a rare case when the Row.AutoItem() does not correctly calculate the width of its content.
Fixed: the QuestPDF Previewer does not work with content-rich documents.