The build was green, the release notes were done, and the customer portal rejected the documentation PDF at 4:57 p.m. The file was only a manual, but suddenly it was the last unresolved dependency in the release.
Compression Starts With Classification
A PDF is a container, not an image format
The phrase “compress a PDF” sounds like a single operation. It is not. A PDF can contain text streams, embedded fonts, vector drawings, JPEG images, lossless images, annotations, forms, attachments, metadata, and several generations of incremental edits.
Two files can have the same page count and radically different size profiles. A 100-page API reference exported from a documentation generator may be mostly text and vector lines. A ten-page inspection report may contain ten full-resolution photographs. Rewriting both through the same pipeline is convenient, but convenience is not the same as correctness.
The first engineering decision should therefore be classification.…