QuestPDF

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

Stars
11.7K
Committers
32

Bot releases are hidden (Show)

QuestPDF - 2024.3.3

Published by MarcinZiabek 6 months ago

  • Improved the default scaling behavior of Image and SvgImage elements when they are direct descendants of the Constrained element (Width, Height, MinWidth, MinHeight, MaxWidth, MaxHeight).
  • Enhanced handling of texts containing the carriage return character '\r' within the custom page format setting.
  • Fixed: enhanced the handling of the TextStyle.LineHeight modifier for better consistency with industry-standard software, as well as adjusted the default value.
  • Fixed: when the UseEnvironmentFonts setting is enabled, the Lato font was not being properly registered. This issue could lead to runtime exceptions in specific minimal environments.
  • Fixed: Addressed a potential null reference exception in the SvgImage object’s finalizer that could lead to application crashes when handling invalid SVG content.
QuestPDF - 2024.3.2

Published by MarcinZiabek 6 months ago

  • Introduced support for the linux-musl-x64 platform.
  • Adjusted how the Lato font is embedded in the NuGet package to prevent issues with the files not being provided on the platform-specific runtimes.
  • Improved compatibility with texts that contain the carriage return character '\r'.
  • Enhanced exception messages when the FontManager.RegisterFont method fails due to an invalid font file.
  • Enhanced the Canvas element deprecation message by adding a link to the documentation.
  • Fixed: the SVG image is not always scaled properly, especially when uses relative units internally (percentage, cm, "mm", etc.).
  • Fixed a sporadic AccessViolationException that occurred when UseEnvironmentFonts was set to false and documents were generated in parallel.
  • Fixed an issue where dynamic SVG images were not utilizing the available space correctly. This resulted in images with a zero size.
QuestPDF - 2024.3.1

Published by MarcinZiabek 6 months ago

  • Enhanced discoverability of text alignment options (AlignLeft, AlignCenter, AlignRight, AlignStart, AlignEnd and Justify) when using the shorthand Text method (common use case).
  • To enhance compatibility with existing codebases, we've removed the breaking change associated with the deprecation of the TextStyle.Fallback method. Although this method remains obsolete, we've reintroduced it with a compatibility layer to prevent disruptions.
  • Enhanced compatibility with dotnet standard projects.
  • Fix: on the Windows platform, the "Could not find an appropriate font fallback for the following glyphs: $U-000D" exception is thrown when the "QuestPDF.Settings.CheckIfAllTextGlyphsAreAvailable" is set true, and the "TextDescriptor.Line" method is used (that inserts the '\r' character).
  • Fix: resolved an issue where the positioning of hyperlinks was incorrect when text contained injected block items.
QuestPDF - 2024.3.0

Published by MarcinZiabek 6 months ago

The primary theme of this release is the removal of the SkiaSharp dependency and the introduction of a custom native layer built on top of Skia M124.

Primary features

This change was necessary to provide much higher flexibility and enable several new long-awaited features:

  • Font subsetting - this feature includes only necessary font glyphs in the output document, significantly reducing the file size, especially when using glyph-rich fonts supporting multiple languages,
  • Improved text-related capabilities, including but not limited to text justification, bi-directionality, enhanced line-breaking algorithms, more styles for text decoration, word spacing, and more,
  • Introduced additional document compression to reduce file size further,
  • Integrated native SVG support,
  • In future releases: enhanced accessibility through support for PDF tags.

Other changes

  • Removed the SkiaSharp dependency, thereby making QuestPDF a standalone library,
  • Updated the Lato font to the latest version (2.015),
  • Included licenses of the third-party dependencies in the NuGet package,
  • Included a list of Contributors in the NuGet package to acknowledge the valuable input from our Community in improving QuestPDF.

Breaking changes

Unfortunately, this release also introduces breaking changes:

  • Removed support for injecting SkiaSharp content directly into the document. It is still possible to integrate SkiaSharp through vector and raster graphics; please consult the documentation for more details,
  • Removed support for platforms: Android, iOS, UWP, WASM, and Linux-Alpine. We are currently investigating reintroducing support for WASM and Linux-Alpine in future releases.

Acknowledgments

The work on this release took many months and was only possible with proper development funding. We would like to thank every company that followed the licensing terms and purchased the license.

The help of the QuestPDF Community was also astounding. Thank you for active testing and for providing valuable feedback and contributions.

We would also like to thank the SkiaSharp project, its maintainers, and its contributors for creating an exceptional graphics library. It was a fantastic foundation for QuestPDF for over 3 years.

QuestPDF - 2024.3.0-rc2

Published by MarcinZiabek 7 months ago

  • Fixed critical issue: the library fails during PDF generation
QuestPDF - 2024.3.0-rc1

Published by MarcinZiabek 7 months ago

  • Greatly reduced memory usage by reusing SkParagraphBuilder instances,
  • Fixed memory leaks in the native code,
  • Fixed: the DocumentMetadata.CreationDate and DocumentMetadata.ModificationDate properties are not properly populated in generated PDF,
  • Fixed: when changing the TextStyle.FontFamilies property, the cache does not work correctly leading to higher memory usage.
QuestPDF - 2024.3.0-rc

Published by MarcinZiabek 7 months ago

  • Updated Skia to version m124,
  • Linux support: Removed dependency on the FontConfig library,
  • Linux support: added support for older Linux distributions, equivalent to Ubuntu 18,
  • Linux support: Introduced support for arm64 architecture,
  • Resolved an issue causing an "Invalid UTF8" error message showing in the console,
  • Addressed a problem with the text underline effect not functioning as expected due to Skia's DecorationMode.Gaps not handling all fonts correctly,
  • Optimized the algorithm for loading fonts provided in the application folder, including default fonts, for better performance.
  • Included a list of contributors in the nuget package, to acknowledge the valuable input from our community in improving QuestPDF,
  • Implemented safeguards in the native code wrapper to throw an exception when a native object pointer is null,
  • Optimized runtime (Avalonia) and development dependencies,
  • Refined the native artifacts build system through code refactoring and the integration of execution tests, improving build reliability and efficiency,
  • Planned: in the next major release, the WASM support will be investigated and potentially reintroduced,
  • Known Issue: During stress testing, an issue was identified that native memory usage is higher than expected when generating long documents rich in short text elements. This issue is currently under investigation and will be addressed in the next major release.

Find more details about this release in the following discussion: https://github.com/QuestPDF/QuestPDF/discussions/622

QuestPDF - 2024.3.0-beta1

Published by MarcinZiabek 7 months ago

🎊 Version 2024.3.0-beta1 🎊

  • Greatly reduced the size of the native binaries by switching from ICU to libgrapheme,
  • Improved the logic for finding and loading native dependencies (implemented in https://github.com/QuestPDF/QuestPDF/pull/813 with massive help from @samceustermanscoteng, thank you!),
  • Fixed an issue where the font fallback does not work when the Settings.UseEnvironmentFonts setting is set to false,
  • Added the ability to provide multiple font families or fallbacks,
  • Fixed an issue where the text element does not render its content in certain scenarios when it contains page numbers,
  • Fixed an issue where SkSvgCanvas may produce incomplete results, resulting in invalid SVG content,
  • Improved memory management for SkParagraph in certain scenarios.

Find more details about this release in the following discussion: https://github.com/QuestPDF/QuestPDF/discussions/622

QuestPDF - 2024.3.0-beta

Published by MarcinZiabek 8 months ago

🎊 Version 2024.3.0-beta 🎊

  • Updated the codebase to Skia m122 and resolved all backward-incompatible changes,
  • Added support for the .NET Standard 2.0,
  • Improved P/Invoke and marshaling compatibility with the legacy .NET Framework,
  • Fixed a bug in the Text element that could cause an exception under certain conditions,
  • Updated the Lato font to the latest version (2.015),
  • Improved the loading method for native dependencies,
  • Added the Text.ClampLines functionality,
  • Added support for adjusting the thickness and style of text decorations (overline, strikeout, underline),
  • Added support for word spacing,
  • Reduced the risk of race conditions in Avalonia in the QuestPDF Previewer,
  • Enhanced exception message when the QuestPDF Previewer fails to load due to missing required dotnet 8 runtime,
  • Improved native memory management and fixed memory leaks,
  • Include licenses of the third party dependencies in the NuGet package,
  • Performed code cleanup and made minor adjustments.

Find more details about this release in the following discussion: https://github.com/QuestPDF/QuestPDF/discussions/622

QuestPDF - 2024.3.0-alpha

Published by MarcinZiabek 8 months ago

This release's primary theme is removing the SkiaSharp dependency and introducing a custom native layer built on Skia M121. This change was necessary to provide much higher flexibility and enable several new long-awaited features:

  • Font subsetting - this feature includes only necessary font glyphs in the output document, reducing the file size. The size difference can be enormous when complex fonts are used of various styles,
  • Improved text-related capabilities, including text justification, bi-directionality, enhanced line-breaking algorithms, and more,
  • Introduced additional document compression to reduce file size,
  • Integrated native SVG support,
  • Improved performance by 25% on average,
  • In the future release: enhanced accessibility by support for PDF tags.

We thank the SkiaSharp project, its maintainers, and contributors for creating a fantastic graphics library. It was an exceptional foundation for QuestPDF for over 3 years.

This release requires at least .NET Standard 2.1. The beta release will reintroduce support for the .NET Standard 2.0.

This significant achievement was made possible by introducing the hybrid license and substantially improved funding for development. Thank you!

QuestPDF - 2023.12.5

Published by MarcinZiabek 8 months ago

  • Fix: resolved an issue where the Column element applies double spacing when its child does not occupy any space
  • Fix: the Text.SectionLink element does not work correctly
  • Improvement: redesigned the automated layout issue detection algorithm
  • Improvement: when drawing content with the Canvas element, the library now clips drawn content to the element's boundaries. This prevents potential overflow when integrating with other libraries
  • Improvement: enhanced layout stability
QuestPDF - 2022.12.15

Published by MarcinZiabek 8 months ago

  • Improvement: when drawing content with the Canvas element, the library now clips drawn content to the element's boundaries. This prevents potential overflow when integrating with other libraries
  • Fix: resolved an issue where the Column element applies double spacing when its child does not occupy any space
  • Improvement: enhanced layout stability
  • Previewer: updated Avalonia to 11.0.7
QuestPDF - 2022.12.14

Published by MarcinZiabek 9 months ago

  • Update: upgraded the SkiaSharp dependency to version 2.88.7. This update addresses issues with JPEG images being incorrectly encoded/decoded on ARM devices.
  • Maintenance: added .NET 8 as an official build target for the library.
QuestPDF - 2023.12.3

Published by MarcinZiabek 9 months ago

  • Improvement: enhanced the automated layout issue detection algorithm to cover a broader range of cases.
  • Update: upgraded the SkiaSharp dependency to version 2.88.7. This update addresses issues with JPEG images being incorrectly encoded/decoded on ARM devices.
  • Maintenance: added .NET 8 as an official build target for the library.
QuestPDF - 2023.12.2

Published by MarcinZiabek 10 months ago

  • Fixed: The hyperlink element was annotating the incorrect location, in specific layout scenarios when used with right-to-left content direction
  • Enhancement: Improved layout stability for dynamic components utilizing the TotalPages property to generate content
  • Maintenance: The QuestPDF Previewer application has been updated to utilize the latest version of the Avalonia library
QuestPDF - 2023.12.1

Published by MarcinZiabek 10 months ago

Version 2023.12.1

  • Fixed: table layout renders incorrectly if one of its cells spans at least three pages
QuestPDF - 2022.12.12

Published by MarcinZiabek 10 months ago

Version 2022.12.12

  • Fixed: table layout renders incorrectly if one of its cells spans at least three pages
QuestPDF - 2022.12.11

Published by MarcinZiabek 11 months ago

Version 2022.12.0:

Feature: implemented LetterSpacing property for the Text element
Improvement: the Text element API accepts now only string values, objects are not automatically converted anymore
Fix: the Alignment element incorrectly limits size of its child when only one axis is set (horizontal or vertical)
Maintenance: Updated SkiaSharp dependency to 2.88.3

This release was possible thanks to enormous help of AntonyCorbett, thank you!

Version 2022.12.1:

Fixed: loading fonts from embedded resource via the FontManager.RegisterFontFromEmbeddedResource method
Fixed: better layout calculation stability for the Column element
Improvement: exposed missing API method for the Dynamic component, enabling applying more advanced optimizations
Improvement: better API documentation for the Settings.DocumentLayoutExceptionThreshold property

Version 2022.12.2:

Performance improvements in various areas
Text rendering stability improvements
Fixed: the Settings.CheckIfAllTextGlyphsAreAvailable setting does not work correctly

Version 2022.12.3:

Fix: inconsistent text height when using multiple lines with different TextStyles
Improvement: added validation for color arguments
Fix: the inlined element is shown only once in the header but should be repeated on each page

Version 2022.12.4:

Fix: the TextStyle.Fallback property incorrectly inherits parent's and global properties
Improvement: updated the CreateNotMatchingFontException message to mention that the glyph checking operation can be disabled with the Settings.CheckIfAllTextGlyphsAreAvailable setting

Version 2022.12.6:

Fix: fixed the rendering order of table cells in certain scenarios

Version 2022.12.7:

Text rendering enhancement: a fake underline is drawn when the font typeface lacks an underline effect configuration or it is unavailable on runtime operating system
Text rendering enhancement: a fake strikethrough is drawn when the font typeface lacks a strikethrough effect configuration or it is unavailable on runtime operating system
Text rendering enhancement: a fake skew operation is applied to mimic an italic effect when the provided font lacks an italic variant
Text rendering enhancement: a fake bold effect is applied when the font doesn't offer variants of higher weight

Version 2022.12.8:

Updated SkiaSharp dependency from 2.88.3 to 2.88.6
Updated QuestPDF Previewer dependencies: from Avalonia 0.10.X to 11.0.X

Version 2022.12.9:

Enhanced developer experience by refining the accuracy of the exception message thrown when native SkiaSharp dependencies are unavailable in the runtime environment.

Version 2023.12.10

Enhanced SkiaSharp native dependency detection for increased compatibility.
Fixed rare instances of text rendering inaccurately due to cache-related faults.
Fixed a rare problem where the Row element does not always respect layout issues in its children.

Version 2023.12.11

Back-ported feature as part of extended support: simplified development loop by introducing cross-platform methods GeneratePdfAndShow() and GenerateXpsAndShow()
Back-ported community-developed feature: added functionality to specify unit types for the Spacing property in the Row element, improving Fluent API consistency (by @sclarke81)
Back-ported community-developed improvement: integrated CancellationToken support in the ShowInPreviewer method (by @marcmognol)
Back-ported community-developed improvement: simplified DynamicComponent usage by introducing a state-less component model (by @bennetbo)

QuestPDF - 2023.12.0

Published by MarcinZiabek 11 months ago

Version 2023.12.0

  • Feature: added a Shrink element that enables relaxation of layout constraints from the parent element, applicable to both vertical and horizontal axes independently
  • Feature: developed the ShowIf API, allowing conditional visibility of elements based on rendering context (initially supports PageNumber only)
  • Feature: added functionality to specify unit types for the Spacing property in the Row element, improving Fluent API consistency (by @sclarke81)
  • Optimization: reduced memory usage and decreased Garbage Collector pressure in the FluentAPI, enhancing performance
  • Improvement: integrated CancellationToken support in the ShowInPreviewer method (by @marcmognol)
  • Improvement: simplified DynamicComponent usage by introducing a state-less component model (by @bennetbo)
  • Testing: introduced a new internal layout-testing engine (prototype)

Huge thanks to all contributors and community members. Your help is highly appreciated!

QuestPDF - 2023.10.2

Published by MarcinZiabek 11 months ago

  • Resolved issue with page numbering errors in merged documents.
  • Enhanced SkiaSharp native dependency detection for increased compatibility.
  • Fixed rare instances of text rendering inaccurately due to cache-related faults.
  • Fixed a rare problem where the Row element does not always respect layout issues in its children.