Skip to content

v1.21.0

Choose a tag to compare

@Moonwalker1307 Moonwalker1307 released this 28 Oct 06:59
8d7d3c9

Highlights

  • Tables across pages, as in Chrome. A row that does not fit at the bottom of a page now breaks inside, cell by cell, instead of moving to the next page whole, and the repeated header and footer close each page around it. break-before and break-after work on rows and row groups, break-inside: avoid on a tbody (or break-after: avoid on a group's header row) keeps a group together, a kept box taller than a page starts on the next page, and a collapsed table closes with its own border on every page it crosses.
  • Colour fonts. Text in COLR colour fonts (versions 0 and 1, such as Noto Color Emoji) prints in colour as Chrome prints it, stays searchable text, and passes veraPDF for every PDF/A and PDF/UA profile. Skin tones, flags and zero width joiner sequences join.
  • Structured PDF to HTML. PdfHtmlMode.Structured writes a PDF's text as headings, paragraphs, lists and real tables, reads tagged PDFs from their structure tree, and with PdfHtmlOptions.IncludeStyles and IncludeImages keeps fonts, colours, filled boxes, table borders and images. Column and row detection was measured on the ICDAR 2013 table set.
  • Acid2 passes. CSS error recovery, escapes in selectors, margin collapsing with mixed signs, mitred border corners, empty CSS tables, a stray </p>, unitless lengths only in quirks mode, stylesheets in data: URLs and fixed boxes painting by z-index now behave as in browsers, taking the Acid2 face from 26% to 99% of Chrome's pixels.
  • More CSS and HTML: srcset, sizes and <picture>; images and gradients in ::before and ::after content; gradient colour interpolation (in oklch, in oklab, hsl longer hue, as Tailwind 4 writes); gradient list markers; bookmarks from CSS (bookmark-level, bookmark-label, bookmark-state); block-ellipsis; image-orientation from EXIF; text-underline-position; legacy clip: rect(); background-attachment: fixed; pictures in <embed> and <object>; HTML inside SVG foreignObject; SVG context-fill and context-stroke; Charts.css charts; old -webkit- syntax; floats and sized boxes in vertical writing modes and left-to-right line order in vertical-lr; absolutely positioned boxes inside positioned inline elements.
  • Closer to Chrome: outlines and dashed or dotted borders with Chrome's corners and 3D shades, the outline of a wrapped inline as one shape, percentage table columns that fill the table, stretched images and stretched items in flex and grid, a smaller default size for bare monospace text, images on whole CSS pixels, break-all and overflow-wrap: anywhere shrinking table cells, forced page breaks between flex lines, bottom margins truncated at page breaks, and row backgrounds that no longer cover collapsed borders.
  • Named pages: a header or footer with data-sticky-pdf-page="name" belongs to the pages of that named page.
  • PdfPecker.Fluent: several Page calls become named pages of one document, so page numbers, links, PDF/A, PDF/UA and signatures work across them and GenerateHtml accepts them; new TextField, CheckBox, RadioButton, ComboBox, ListBox and footnotes; ScaleToFit, ShowOnce and SkipOnce; a much faster QR code mask choice.
  • Hostile input: limits on generated-content images and on colour-font paints per document keep both within bounded time and memory, and a fuzzing fix keeps the layer order of headers and footers with page numbers per page.

Output changes

Golden baselines changed where the output now matches Chrome more closely: dashed and dotted border fitting (background-image/demo, complex/cjk, complex/flex-grid, complex/invoice, css3/demo, features/anonymous-boxes, features/images, features/tables, features/text-wrap, inline-borders/demo, layout-fixes/box-edges, multicol/demo, overflow-clip/demo, small-css-gaps/demo, transparency/demo and the fluent extras), 3D border shades (layout-fixes/registration, svg-effects/demo), row backgrounds under collapsed borders (css3/demo, features/tables, large-table/demo and the operations/encrypt, merge and stamp built from them), images on whole CSS pixels (image-formats/demo and the fluent catalogue and invoice), vertical-lr headers (features/selectors-cascade, pixel-identical) and table rows breaking inside at a page's end (complex/cjk). Documents with long tables can now break rows where they used to move them whole; break-inside: avoid on a row keeps the old behaviour.

The manual for this version: https://pdfpecker.net/docs/v1.21.0/

Full Changelog: v1.20.0...v1.21.0