PDF standard gets Brotli compression for 20 percent smaller files

The PDF Association is introducing Brotli as a new compression filter for PDF 2.0. Tests show an average of 20 percent smaller files compared to Deflate.

listen Print view
Documents with comic symbols, blue background

(Image: heise medien)

4 min. read
Contents

The PDF Association has announced the integration of the Brotli compression algorithm as a new filter into the PDF 2.0 standard. Specifically, the innovation promises an average of 20 percent smaller PDF files without loss of quality. Initial sample PDFs for developers are already available.

Brotli is a free compression algorithm from Google, originally developed for static web assets and specified in RFC 7932. Unlike the Deflate method previously used in PDFs, which is also used in ZIP and GZIP archives, Brotli achieves higher data density with maximum compression. The new filter “BrotliDecode” complements the existing PDF compression methods such as DCTDecode for JPEG, JPXDecode for JPEG 2000, or FlateDecode for Deflate.

In a discussion on Hacker News, developers shared test results with different PDF collections. For 55 test files, Brotli achieved a total size of 37.06 MB, while Deflate required 38.80 MB – an advantage of around 4.5 percent. A single 15 MB file shrunk to 4.5 MB, a 19 KB invoice to 16.1 KB. The actual compression gains depend heavily on the content, as many PDFs already contain Deflate-compressed data streams.

Videos by heise

For comparison, users also tested Zstandard (Zstd), a compression algorithm developed by Facebook. At maximum settings (Brotli Level 11, Zstd Level 22), Brotli showed minimal superiority in most cases. However, Zstd is about twice as fast during decompression – a relevant factor for PDFs that are frequently opened.

However, a portion of the community expresses concerns regarding backward compatibility. PDF is considered an archival format that must remain readable for decades. Older PDF readers that do not recognize the Brotli filter cannot display the compressed content. While the PDF Association emphasizes that new features should work “seamlessly with existing readers,” the introduction of an unknown filter contradicts this principle.

Adobe Acrobat Reader currently does not support Brotli-compressed PDFs. Support in browser PDF viewers is also inconsistent: Chrome might have an advantage through its integrated Brotli library, while Firefox and Edge are currently dependent on updates. Open-source projects like MuPDF and Ghostscript are working on experimental implementations, according to the PDF Association, while the PDF library iText has already integrated Google's Brotli reference code.

For organizations with large PDF archives, there are significant savings potentials. With a data volume of one petabyte, a 20 percent compression gain corresponds to 200 terabytes less storage space. In Germany, this is particularly relevant for GoBD-compliant archiving and ZUGFeRD invoices, where electronic documents must be stored long-term.

The PDF Association developed the Brotli filter as part of its Technical Working Groups. At the Symposium on Advancing the PDF Imaging Model in October 2023, the organization requested feedback on various improvements, including new compression methods. In addition to Brotli, Zstandard and XZ were also evaluated. The final inclusion in the ISO 32000 specification is expected for 2026 or 2027; a specific date has not yet been set.

In parallel, the PDF Association is discussing further compression methods such as JPEG XL for image data. The PDF format, over 30 years old, is thus to be adapted to modern requirements while simultaneously preserving compatibility with existing documents – a balancing act that proves to be a particular challenge with Brotli.

(fo)

Don't miss any news – follow us on Facebook, LinkedIn or Mastodon.

This article was originally published in German. It was translated with technical assistance and editorially reviewed before publication.