QuestPDF is a modern open-source .NET library for PDF document generation. Offering comprehensive layout engine powered by concise and discoverable C# Fluent API. Easily generate PDF reports, invoices, exports, etc.
OTHER License
Bot releases are hidden (Show)
Published by MarcinZiabek over 2 years ago
Fixed text rendering issue: spaces in nested text spans are not rendered correctly.
Published by MarcinZiabek over 2 years ago
#135 Fixed a rare corner case when drawing a text can result with a DocumentLayoutException.
Published by MarcinZiabek over 2 years ago
Bug fixes:
ScaleToFit
element does not work properly when one of the dimensions (width or height) is not constrained,LineVertical
and LineHorizontal
elements which sometimes are not measured correctly (floating-point number rounding error),Published by MarcinZiabek over 2 years ago
ScaleToFit
element - scales its child down so it fits in the provided space,StopPaging
element - when its child requires more than one page to fully render, only the first page is shown,Border
element anymore!Stack
element was renamed to the Column
element,Row
element are now called items
instead of columns
, e.g. RelativeItem
instead of RelativeColumn
,AutoItem
to the Row
element - those items take as little width as possible,Published by MarcinZiabek almost 3 years ago
Introduced new element: Table
- a great way to construct complex document structures, e.g. reports. This element covers all cases offered by the combination of the Stack and the Row elements. Additionally, it provides support for more complex layouts and corner cases. Updating to the Table element can greatly simplify your code 😁
Other changes:
Published by MarcinZiabek almost 3 years ago
Published by MarcinZiabek almost 3 years ago
Inlined
element - put block elements along a line with line-breaking and page-breaking support. This element also supports various element placement in the horizontal axis as well as the baseline. It will help me in the future development, especially with text rendering optimization,SkipOnce
element - it can be used to hide content on the first occurrence of the parent. Useful in conjunction with the ShowOnce
element. This change was proposed by jcl86, thank you!DocumentLayoutException
is thrown. This improvement is based on the discussion started by preiius, thank you!ShowOnce
and the EnsureSpace
elements.Published by MarcinZiabek about 3 years ago
This update is focused on text rendering capabilities:
Additionally, the test coverage has been highly increased. No new bugs have been found :)
Published by MarcinZiabek about 3 years ago
Fixed detecting infinite layout exception in certain cases
Published by MarcinZiabek about 3 years ago
Fixed: continuous page setting does not work properly.
Improved: exception message when overriding existing content.
Published by MarcinZiabek about 3 years ago
Added support for registering custom fonts from a stream.
Published by MarcinZiabek about 3 years ago
This release mostly introduces a couple of additions requested by the QuestPDF community:
PageNumber
component supports now additional placeholders, such as total number of pages or page number of predefined locations. This addition is great for creating lists of content with interactive links,Unconstrained
- it removes any size constraints and gives its child full freedom in terms of layout,Scale
, ScaleHorizontal
and ScaleVrtical
- they allow to change the scale of an included child, making content inside bigger or smaller than it will appear otherwise,FlipOver
, FlipHorizontal
and FlipVertical
- they allow to create a mirror image of the content in one or both axes,RotateLeft
and RotateRight
- they allow to rotate the content by 90 degrees to the left or to the right, preserving space constraints,Rotate(degrees)
- it allows to rotate its content. Important: this element does not preserve space constraints and elements put inside may be placed over other elements,TranslateX
and TranslateY
- they allow to move content in both axes, preserving size constraints.Additionally, this release includes some improvements to the engine used for generating code examples and their results. In the future, it will simplify creating examples and therefore will allow creating better documentation.
Breaking changes:
PageNumber
- the default placeholder storing current page number has changed. Please replace your code following this patter:// change from:
.PageNumber("Page {number}")
// to:
.PageNumber("Page {pdf:currentPage}")
DocumentMetadata
class. The page margins have now predefined fluent API methods and do not rely on the padding element anymore. Please refer to the Getting Started section to see where this information should be placed.Published by MarcinZiabek over 3 years ago
This release is the biggest one so far, offering a handful of new features and helpers:
Box
- it does not enforce parent size to its child,Grid
- allows putting elements on the grid layout. Each element can take various number of columns. To big items will be moved to the next row,Canvas
- allows drawing custom content using the SkiaSharp canvas element,EnsureSpace
- makes sure that pageable content that according to the layout will take multiple pages, has enough space on each page,Layers
- allows drawing content below and above the main layer, e.g. drawing text on top of the image,Debug
element - it does not only highlight space but also puts a small label,Row
element - added spacing property similar to the one available in the Stack
element,Debug
- this element can be used for inspecting its children and space taken by them,Element
can be used for injecting dynamic elements (usually conditionally) without breaking the fluent API chain. This is practically a syntactic sugar to simplify your code.AspectRatio
element allows now to specify scaling rule: fitting width, height or available space.Image
element supports now scaling rules: fitting width, height or available space, as well as scaling unproportionally.GeneratePdf(Stream stream)
method does not close the output stream (thank you for your suggestion tthiery).Published by MarcinZiabek over 3 years ago
Added new element: ShowIf can be used for conditionally showing/hiding elements without using c# if-statement. This is practically syntactic sugar to simplify your code.
Usability improvement: fluent API for changing text style does not mutate original style anymore, creates a copy instead with applied change.
Added possibility to render the document as a set of images.