Skip to content

0.8.0

Latest

Choose a tag to compare

@jhaygood86 jhaygood86 released this 18 Jun 23:20
1ac6731

PeachPDF 0.8.0 Release Notes

Breaking Changes

SixLabors dependencies removed. PeachPDF no longer depends on SixLabors.ImageSharp or SixLabors.Fonts. Image decoding is now handled by StbImageSharp, and font parsing uses an internal TtfFontDescription implementation. Projects that relied on indirect SixLabors transitive dependencies will need to add them directly if still needed elsewhere.


New Features

CSS Generated Content

  • Implemented string-set property and the string() function for running headers/footers.
  • Added support for the content CSS function, enabling ::before/::after pseudo-element content generation.

WOFF / WOFF2 Web Font Embedding

  • PeachPDF can now accept WOFF and WOFF2 font files directly. They are automatically converted to OpenType before embedding in the PDF output (zlib decompression for WOFF; Brotli + inverse transforms for WOFF2).
  • Correct PDF embedding is applied: TrueType fonts use /FontFile2; CFF/OTF fonts use /FontFile3 with the OpenType subtype.

Table Header / Footer Repetition

  • Repeating table headers and footers are now correctly positioned when a table begins beyond the first page. Previously, the page-number counter always started at 0, placing headers/footers at wrong Y positions for multi-table documents.

Bug Fixes

Page Breaks

  • Fixed break-after: page being ignored when set on a preceding sibling element.
  • Fixed break-inside: avoid boxes not being repositioned to margin-top of the new page.
  • Fixed forced page-break detection to correctly handle always, left, and right values (previously left/right were ignored).
  • Fixed forced page-break sibling lookup to skip floated elements.

Multi-Page Table Borders

  • Fixed table bottom border rendering as an artifact line at intermediate page breaks. Table borders are now clipped to the page-break bottom using PushClip rather than modifying the draw rectangle.
  • Fixed PageBreakBottoms accumulating stale data across re-layouts.
  • Fixed repeating table footers being excluded from PageBreakBottoms clipping.
  • Fixed a crash caused by constructing a degenerate (zero or negative height) rounded rectangle during table border clipping.
  • Fixed table row height estimation to include padding and borders, preventing premature page breaks.

Dependency Updates

Package | Change -- | -- SixLabors.ImageSharp | Removed — replaced by StbImageSharp SixLabors.Fonts | Removed — replaced by internal TtfFontDescription StbImageSharp | Added MimeKit | Updated to 4.17.0

Documentation

  • README and inline docs updated to use NetworkLoader / MimeKitNetworkLoader / HttpClientNetworkLoader in place of the older NetworkAdapter API.
  • Image support documentation updated to reference StbImageSharp.
  • Font documentation improved with AddFontFromStream usage notes and supported format list (TTF, OTF, WOFF, WOFF2).