Skip to content

v1.20.0

Choose a tag to compare

@Moonwalker1307 Moonwalker1307 released this 25 Oct 12:34
7b75418

Highlights

  • Linearized output for Fast Web View. PdfOptions.Linearize = true writes a linearized PDF, and the new PdfLinearizer linearizes any existing PDF, such as a merged one, so a viewer loading it over the web shows the first page before the rest has arrived. Checked with qpdf, and PDF/A, PDF/UA and encryption stay valid.
  • Certification (DocMDP) signatures. PdfSignatureOptions.Certification makes the first signature a certification signature at level 1 (no changes), 2 (form filling and signing) or 3 (also annotations), and PdfSignatureVerifier reports the CertificationLevel and any DisallowedChanges made after it. Checked with pyHanko.
  • Viewer settings and page labels. PdfOptions.Viewer sets how a viewer opens the PDF (start page and zoom, page layout, bookmarks or thumbnails panel, full screen, window preferences, print scaling and duplex), and PdfOptions.PageLabels numbers pages the way the viewer shows them, such as roman numerals for front matter. PdfMergeOptions has both too.
  • Reading existing PDFs: PdfDocumentProperties.Read gives the title, author, dates, custom properties, PDF version, page sizes, encryption and permissions, claimed PDF/A and PDF/UA conformance, and whether the file is tagged or linearized. PdfImages.Extract returns the images the pages draw, each once with where it is drawn, with JPEGs as their original bytes and the rest as PNG, and their EXIF and XMP metadata.
  • Privacy: PdfOptions.StripImageMetadata removes EXIF (camera, time, GPS location), XMP, IPTC and comments from embedded JPEGs, and keeps the colour profile, so the images look the same.
  • PDF to HTML: the browser's find now matches phrases in the text layer, not only single words, and the text layer is about 30% smaller.
  • Fixes: a heading's bookmark in a grid row that crosses a page points at the heading, blurred box shadows no longer show a thin line at their outer edge in Poppler-based viewers, words with letters outside the Basic Multilingual Plane hyphenate without failing, and SVG text inside many nested translucent groups gets its font.
  • Faster running headers and footers: a sticky header or footer without page numbers is laid out once instead of on every page.
  • Hostile input: fuzzing fixes keep nested columns, flex rows, keep-with-next chains, running bands, CID font widths, JBIG2, JPEG 2000, SVG and filter regions within bounded time and memory.
  • PdfPecker.Fluent copies the new Viewer, PageLabels, Linearize and StripImageMetadata options (a document of several page sets is linearized once, after merging), and Hyperlink no longer lets an IndexOutOfRangeException from System.Uri through for some file and UNC paths.

Output changes

Golden baselines changed only by an /I true on the soft mask of each blurred box shadow (complex/dashboard, features/images, translucent-effects/demo, transparency/demo and the fluent extras), which PDFium renders pixel for pixel the same, and by the new text-layer markup in the three PdfToHtml baselines. Without the new options, output is otherwise byte-identical to 1.19.0 except for documents that hit the fixes: bookmarks of headings in grid rows that cross a page, and very deeply nested or hostile documents.

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

Full Changelog: v1.19.0...v1.20.0