PDF size depends on content, image encoding, fonts and document structure. This guide explains common contributors and compression approaches; actual savings depend on the file and the changes allowed.
What's Inside a PDF File?
A PDF is essentially a container that holds multiple types of objects. Understanding these objects is the key to understanding file size:
- Content streams — the actual page content: text operators, vector drawing commands, and references to embedded objects.
- Images — often the largest component. A single uncompressed photo can be 10—30 MB inside a PDF.
- Fonts: Embedded font data can contribute to size. The amount depends on the fonts, glyph coverage, embedding mode and compression; this guide does not establish a typical megabyte saving.
- Metadata — author, title, dates and XMP properties. Accessibility structure tags are a distinct document structure and should not be treated as disposable descriptive metadata.
- Cross-reference table — an index that maps every object to its byte offset, enabling random access.
Why Are Some PDFs So Large?
Common reasons for bloated PDFs:
| Cause | Typical Impact | Solution |
|---|---|---|
| Uncompressed or high-DPI images | 10—50 MB per image | Downsample to 150 DPI for screen, re-encode as JPEG |
| Full font embedding | 1—5 MB per font | Subset fonts (embed only used glyphs) |
| Scanned pages (image-only PDF) | 2—10 MB per page | Re-render at lower DPI, apply JPEG compression |
| Duplicate objects | 1—10 MB | Object deduplication |
| Incremental saves | 2×–5× original size | Re-save (flatten incremental updates) |
| Embedded multimedia | Varies widely | Remove or link externally |
PDF Compression Techniques
There are two categories of compression: lossless (no quality reduction) and lossy (quality trade-off for smaller size).
Lossless Techniques
These reduce file size without any visual change:
- Flate/Deflate compression — the standard compression for content streams. Uses the same algorithm as ZIP files (zlib). Most modern PDFs already use this.
- Object streams — groups multiple small PDF objects into a single compressed stream, reducing overhead. Introduced in PDF 1.5.
- Cross-reference stream compression — replaces the text-based cross-reference table with a compressed binary stream.
- Font subsetting: Embed the required glyphs and supporting data when the license and workflow permit. Savings depend on the actual font and usage; editing and conformance requirements still apply.
- Duplicate object removal — if the same image appears on 10 pages, store it once and reference it 10 times.
- Metadata stripping — remove unnecessary XMP metadata, thumbnails, and edit history.
Lossy Techniques
These trade some quality for significantly smaller files:
- Image downsampling — reduce image resolution from 300 DPI to 150 or 72 DPI. A 300 DPI image has 4× the pixels of a 150 DPI image.
- JPEG re-encoding — re-encode suitable raster images as JPEG. Savings and visible artifacts depend on the image, encoder and quality setting; PDF images are not necessarily embedded PNG files.
- Color conversion: converting CMYK images to RGB can change appearance and output suitability. Four channels versus three does not imply a fixed 25% compressed-file saving; preserve the color requirements of the intended workflow.
- Resolution capping — enforce a maximum DPI regardless of the source image's original resolution.
Image Resolution: What DPI Do You Actually Need?
| Use Case | Recommended DPI | Reason |
|---|---|---|
| Screen viewing / email | 72–96 pixels per inch (starting point) | Screen density, viewing size and zoom vary; inspect fine detail on target devices |
| Web download | 150 DPI | Good balance of clarity and file size; test at the intended viewing size and zoom |
| Professional printing | 300 DPI | Common raster-image starting point; ask the printer for its requirements |
| Large-format printing | 150–200 pixels per inch (starting point) | Viewed from a distance, so lower DPI is acceptable |
How Our Compress PDF Tool Works
The Compress PDF tool on SarvKit uses a dual-strategy approach:
- Strategy 1: Lossless re-save — re-serializes the PDF with object streams and cross-reference compression enabled. This catches the "easy wins" — bloated exports, incremental saves, uncompressed streams.
- Strategy 2: JPEG re-render — renders each page as a JPEG image and rebuilds the PDF. This is more aggressive and works well for scanned documents or image-heavy PDFs.
- Winner takes all — the lossless re-save runs by default. JPEG re-rendering runs only when you enable the lossy option. The tool offers a download only when a candidate is smaller; no reduction means these settings did not help, not that every possible optimization has been exhausted.
Everything runs in your browser using JavaScript — no files are uploaded to any server.
Best Practices for Keeping PDFs Small
- Resize images before inserting — don't embed a 4000×3000 photo when the display area is 800×600 pixels.
- Use vector graphics where possible — logos, charts, and diagrams as SVG/vector are tiny compared to raster images.
- Save behavior varies by application. A full rewrite may remove incremental revisions or reduce size, but Save As alone does not prove that obsolete objects, metadata or sensitive content have been removed.
- Subset fonts — use font subsetting when permitted by the font license and compatible with later editing or conformance needs.
- Remove hidden content — hidden layers, annotations, comments, and form field data all add to file size.
- Avoid PDF/A unless required — PDF/A requires compliant embedding of the glyphs used in the document, not necessarily the entire font. Compliant font subsets are permitted; file size depends on the content and conformance requirements.
Common Myths About PDF Compression
- "ZIP-ing a PDF makes it smaller" — rarely. PDF content streams are already Deflate-compressed. An additional ZIP layer may save little or no space; measure the actual file.
- “Removing metadata saves a lot of space” — savings vary. Inspect actual objects rather than assuming metadata is always only a few kilobytes; do not strip accessibility structure to chase size.
- "Re-saving always helps" — only if the original wasn't well-optimized. A PDF exported from a modern tool with compression enabled may not benefit from re-saving.
- "All compression is lossy" — lossless techniques (object streams, deduplication, subsetting) reduce size without any quality change.
Compression Results: What to Expect
| PDF Type | Potential (not a benchmark) | Primary Technique |
|---|---|---|
| Word/PowerPoint export | Depends on the export | Lossless re-save + font subsetting |
| Scanned documents | Depends on resolution and artifacts accepted | JPEG re-render at lower DPI |
| Image-heavy reports | Depends on image content | Image downsampling + JPEG re-encoding |
| Text-only PDFs | May be small or zero | Object stream compression |
| Already-optimized PDFs | May be zero or an increase | Minimal gains possible |