QuestPDF.Previewer
2022.12.1
See the version list below for details.
dotnet tool install --global QuestPDF.Previewer --version 2022.12.1
dotnet new tool-manifest # if you are setting up this repo dotnet tool install --local QuestPDF.Previewer --version 2022.12.1
#tool dotnet:?package=QuestPDF.Previewer&version=2022.12.1
nuke :add-package QuestPDF.Previewer --version 2022.12.1
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 Compatible and additional computed target framework versions. |
---|---|
.NET | net6.0 is compatible. net6.0-android was computed. net6.0-ios was computed. net6.0-maccatalyst was computed. net6.0-macos was computed. net6.0-tvos was computed. net6.0-windows was computed. net7.0 was computed. net7.0-android was computed. net7.0-ios was computed. net7.0-maccatalyst was computed. net7.0-macos was computed. net7.0-tvos was computed. net7.0-windows was computed. net8.0 was computed. net8.0-android was computed. net8.0-browser was computed. net8.0-ios was computed. net8.0-maccatalyst was computed. net8.0-macos was computed. net8.0-tvos was computed. net8.0-windows was computed. |
This package has no dependencies.
Version | Downloads | Last updated |
---|---|---|
2024.7.1 | 8,471 | 8/27/2024 |
2024.7.0 | 6,610 | 7/4/2024 |
2024.6.1 | 1,515 | 6/25/2024 |
2024.6.0 | 2,434 | 6/11/2024 |
2024.3.1 | 5,063 | 5/2/2024 |
2024.3.0 | 4,149 | 4/12/2024 |
2024.3.0-rc | 630 | 3/27/2024 |
2024.3.0-beta | 572 | 2/29/2024 |
2024.3.0-alpha | 406 | 2/15/2024 |
2023.12.2 | 10,491 | 1/12/2024 |
2023.12.1 | 2,970 | 1/1/2024 |
2023.12.0 | 5,020 | 12/3/2023 |
2023.10.0 | 6,137 | 10/23/2023 |
2023.10.0-alpha0 | 295 | 10/23/2023 |
2023.9.0 | 3,625 | 9/25/2023 |
2023.6.0 | 7,559 | 6/28/2023 |
2023.5.0 | 2,360 | 5/15/2023 |
2023.4.0 | 1,596 | 5/4/2023 |
2022.12.4 | 3,062 | 2/7/2024 |
2022.12.3 | 311 | 1/12/2024 |
2022.12.2 | 483 | 1/1/2024 |
2022.12.1 | 719 | 10/23/2023 |
2022.12.0 | 19,585 | 12/14/2022 |
2022.11.1 | 1,440 | 11/11/2022 |
2022.11.0 | 1,209 | 11/5/2022 |
2022.9.1 | 1,788 | 9/19/2022 |
2022.9.0 | 1,173 | 9/18/2022 |
2022.8.0 | 2,557 | 8/15/2022 |
2022.6.0 | 3,573 | 6/12/2022 |
2022.5.0 | 3,034 | 5/9/2022 |
2022.4.1 | 1,769 | 4/8/2022 |
2022.4.0 | 1,705 | 4/4/2022 |
Initial release.