Brotli Compression Comes to PDF
Member NewsAugust 19, 2026
Member NewsAugust 19, 2026
About Daniel Wilson, BFO (Big Faceless Organization)
The views expressed in this article are those of the author(s) and do not reflect the policies or positions of the PDF Association.
PDF is fundamentally a container for different types of data. Much of that data is held in streams, which can contain things such as page content, fonts, images and embedded files. In a typical PDF, streams make up a significant proportion of the file, so compressing them is an important part of keeping PDF files efficient.
For many years, the standard choice for general-purpose compression in PDF has been Flate. Flate is also the compression algorithm behind formats such as ZIP and PNG. It remains a capable and widely supported compression method, but it has been part of the PDF specification since 1996.
That’s almost 30 years of the same general-purpose compression technology in a format that continues to evolve.
A New Compression Option
The PDF Association has been working on alternatives to Flate and has recently formalised support for Brotli compression in PDF.
Originally developed by Google, Brotli is already well established outside PDF. It is used, for example, in the WOFF web font format and is supported across a wide range of platforms and software.
For PDF, Brotli can be used as an alternative to Flate for compressing streams. This makes it particularly interesting for applications that generate large numbers of PDFs or need to transfer PDF files efficiently.
Our own testing has shown encouraging results. With text-heavy PDF documents, Brotli-compressed files have typically been around 85% of the size of the equivalent files compressed using Flate.
The exact savings will naturally depend on the content of the PDF, but the potential reduction is significant.
The Chicken-and-Egg Problem
There is one important difference between introducing a new compression method and simply improving an existing implementation: compatibility.
A PDF containing Brotli-compressed streams can only be fully processed by PDF software that understands Brotli. If a PDF application doesn’t support the new filter, it won’t be able to decompress those streams.
This creates a familiar chicken-and-egg problem.
PDF software vendors need to implement Brotli before applications can safely start using it, while there is little incentive to add support until PDFs using Brotli become more common.
As the PDF industry begins adopting the new compression format, interoperability will therefore be an important consideration.
That’s one of the reasons we’re outlining the current Brotli support available in BFO products.
Brotli Support in BFO
BFO has supported Brotli in the BFO PDF Library for some time, although we haven’t previously announced the capability in detail.
Reading Brotli-compressed PDFs
The BFO PDF Library has supported reading PDFs containing Brotli-compressed streams since version 2.29.3, released in September 2025.
No additional JAR files are required for this functionality. The library includes a 100% Java Brotli decoder, derived from Google’s Java Brotli decoder, directly within bfopdf.jar.
This means applications using the BFO PDF Library can read PDFs containing Brotli-compressed content without installing a separate native dependency.
Writing Brotli-compressed PDFs
Support for writing Brotli-compressed PDFs was added in version 2.29.5, released in April 2026.
The current implementation uses the com.aayushatharva.brotli4j package. Unlike the decoder used for reading PDFs, this implementation relies on native bindings, so the Brotli4j package needs to be available separately.
Installation instructions are available from the Brotli4j project. Alternatively, BFO provides a packaged brotli-1.20-fat.jar, which includes native bindings for most platforms and can simply be added to the application's classpath:
Enabling Brotli compression
Existing BFO PDF Library applications can continue to use Flate compression without any changes.
To generate a PDF using Brotli instead, configure the PDF OutputProfile to require the Brotli filter:
| Flate compression | Brotli compression |
|---|---|
PDF pdf = new PDF(); |
OutputProfile profile = new OutputProfile(OutputProfile.Default);profile.setRequired(OutputProfile.Feature.FilterBrotli);PDF pdf = new PDF(profile); |
This allows Brotli to be enabled at the PDF level while leaving the rest of the PDF generation process unchanged.
What About Other BFO Products?
Brotli support isn’t limited to the PDF Library.
BFO Report Generator and BFO Publisher will also be updated to provide Brotli support.
This will make it possible for applications using BFO’s higher-level PDF generation products to take advantage of the same compression technology.
Early Days for Brotli and PDF
Brotli support in PDF is still relatively new, so widespread adoption won’t happen overnight. PDF software across the industry will need to add support before Brotli-compressed PDFs can be used universally.
That said, the technology is already usable today.
The BFO PDF Library implementation is functional, and BFO has been involved in the industry work around bringing Brotli to PDF. We’ve also carried out interoperability testing with other organisations to help ensure that implementations work correctly across different PDF tools.
For applications where reducing PDF size is important, Brotli is therefore worth considering now — particularly where the PDF files are being exchanged between systems known to support the format.
As more PDF software adds support, we expect Brotli to become an increasingly useful alternative to the long-established Flate compression method.
BFO is a pioneer and industry veteran in developing APIs for seamlessly working with PDF documents and graphs. Established in 1998, BFO proudly serves clients across 50 countries, including organizations such as Boeing, Harvard University, JPMorgan Chase, Roche, HSBC, Toyota, and the US Department of Energy. Products PDF Library Publisher…
Read more



