Guide
Fonts and Hidden Content That Quietly Add Weight to a PDF
Embedded fonts, metadata, attachments, thumbnails, and leftover objects can bloat a PDF. Learn what they are and when it is safe to remove them.
Key takeaways
- Embedded fonts keep a document looking the same everywhere; embedding subsets keeps the cost down.
- Attachments, annotations, thumbnails and leftover objects can add weight, and a full rewrite can discard unused ones.
- Incremental saves append changes, so a document saved many times keeps old data.
- Rewriting invalidates earlier digital signatures, so do not do it to signed documents unless you will re-sign.
- Do not remove signatures, required e-invoice data, accessibility tags or anything PDF/A needs, such as embedded fonts.
Once images are under control, a PDF can still be heavier than it looks. The remaining weight often hides in places most readers never see: embedded fonts, document metadata, attached files, form data, comments, thumbnails, and objects left behind by earlier edits. Individually these are usually small, but in a document that has been through many hands they can add up. This guide explains what each one is, why it exists, and when you can safely remove it.
Why do PDFs embed fonts?
Fonts are files installed on a computer. If a PDF simply named a font and relied on the reader's system to supply it, the document would look different, or break entirely, on any machine that lacked that font. To prevent this, PDFs can embed the font data inside the file. The result looks the same everywhere, which is the whole promise of the format.
The cost is size. A complete font may include thousands of characters, many of them for languages and symbols the document never uses. Several fonts in several weights and styles, such as regular, bold, italic, and bold italic, can multiply this.
Full embedding versus subsetting
Subsetting embeds only the characters that the document actually uses. If your text needs a few dozen distinct letters and digits, the embedded data is a small fraction of the complete font. For most documents, subsetting is the right choice because it preserves appearance while cutting weight. Complete embedding is useful when someone else is expected to edit the text later and needs all the characters available, but it is rarely necessary for a file you are simply sending out.
Not embedding at all
Some tools allow you to skip embedding for common fonts, trusting the reader's device to supply a standard substitute. This can save space, but the document may render with different spacing or letter shapes, which is risky for anything with a precise layout. It also breaks down for unusual fonts and for non-Latin scripts. Treat it as a last resort and not a default.
Font hygiene
- Use fewer font families. Two well-chosen families are usually plenty, and each additional one adds data.
- Avoid unnecessary weights and styles. Do you need a light, a regular, a medium, a semibold, and a bold, or would two do?
- Watch for fonts used only by an invisible element, such as a stray space in a decorative face. Removing the element removes the font.
- Be aware of licensing: some fonts restrict embedding. Respect the terms that came with yours.
How much does metadata add?
Metadata is information about the document rather than its visible content: title, author, subject, keywords, creation and modification dates, and the name of the software that made it. Standard metadata is tiny. The exception is richer, structured metadata blocks, which can include detailed edit histories and software-specific data. These can reach noticeable sizes in files that have been processed through several programs.
Metadata also has a privacy dimension. Author names, internal file paths, and edit histories can reveal more than you intend to share. Many PDF tools include a function to inspect and remove metadata. Doing so before publishing or sharing a document externally is a sensible habit, whether or not size is a concern.
Can files hide inside a PDF?
A PDF can carry other files inside it: spreadsheets, images, source documents, even other PDFs. This is sometimes deliberate and useful, such as an invoice carrying its machine-readable data. But it can also happen unintentionally, for example when a form or portfolio-style document includes a bundle of supporting files. Open the attachments panel of your PDF viewer to see whether anything is embedded. If the attachments are not needed by the recipient, removing them can produce a dramatic reduction.
Annotations, comments, and form data
Comments, highlights, sticky notes, and drawn markups are stored as annotation objects. Reviewed documents can accumulate dozens or hundreds of them. Interactive form fields hold values, formatting information, and scripts. If a document is final and the review is complete, flattening annotations and forms turns them into static page content, which can simplify the file. Flattening is a one-way change: fields stop being fillable and comments stop being editable, so keep an unflattened copy if you might need them.
Thumbnails, bookmarks, and navigation
Some PDFs store a small preview image for every page. These are rarely necessary because modern viewers generate their own, and removing them can recover space in long documents. Bookmarks, by contrast, are tiny and useful for navigation. Keep them.
What are unused and duplicated objects?
As a PDF is edited, objects can be orphaned. They remain in the file even though no page references them. Examples include replaced images, deleted pages' resources, and old versions of content streams. Another common problem is duplication: the same logo or image stored again for every page instead of being referenced once. A thorough clean-up function, often described as discarding unused objects, removing duplicate resources, or optimizing the document structure, identifies and deletes these. Saving the file afresh with a full rewrite, rather than an incremental save, can also discard leftovers.
Incremental saves
Some programs save changes by appending new data to the end of the file instead of rewriting it, a technique that allows quick saves and preserves signatures. Wikipedia's PDF article describes the same design: it allows small changes to be made without rewriting the entire file. The price is accumulation: previous versions of edited items stay in the file. If a PDF has been annotated and saved over and over, a complete rewrite may shrink it noticeably. The caveat is that rewriting invalidates digital signatures applied earlier, so do not do it to a signed document unless you are prepared to re-sign.
Layers, transparency, and color profiles
Optional content layers let a document show or hide groups of objects. If you do not need the hidden layers in the version you are distributing, flattening or removing them discards content that nobody would see anyway. Embedded color profiles describe how colors should be interpreted. They are important in professional printing workflows, but for ordinary screen documents they can often be dropped or standardized. As with everything in this guide, consider the destination: print workflows may rely on profiles that screens do not need.
Hidden items and how to treat them
| Item | Typical cost | Safe to remove? | Caution |
|---|---|---|---|
| Whole fonts | Moderate to high | Replace with subsets | PDF/A needs fonts embedded |
| Metadata | Small, sometimes larger | Usually, and it helps privacy | PDF/A requires some metadata |
| Attachments | Small to large | If the recipient does not need them | Invoices may carry required data |
| Annotations and form data | Small to moderate | Flatten only when final | One-way change |
| Thumbnails | Small | Usually | Viewers generate their own |
| Incremental leftovers | Grows with each save | Full rewrite discards them | Invalidates earlier signatures |
A careful order of operations
- First, handle images, since they usually give the largest savings.
- Second, review attachments and delete any that are unnecessary for the recipient.
- Third, inspect and clean metadata, particularly before sharing outside your organization.
- Fourth, flatten or remove annotations and forms only if the document is final.
- Fifth, subset fonts and discard unused objects with a full rewrite.
- Finally, check that the document still opens, displays, and prints as expected.
What should I not remove?
Be cautious with anything tied to legal or compliance requirements. Digital signatures, certain embedded data in electronic invoices, and accessibility tags may be required in your context. Archival formats, covered in a later guide, may also forbid some of the changes described here. When in doubt, keep the original and test your reduced copy against whatever rules apply to the recipient.
Hidden content seldom accounts for the biggest share of a PDF, but combined with sensible image settings it can be the difference between a file that squeezes under a limit and one that stays stubbornly over it.
Sources and further reading
- Wikipedia: PDF: the container structure, font embedding, incremental update and the difference between linearized and non-linearized files.
- Library of Congress: PDF/A-1 format description: that PDF/A-1 requires all fonts to be embedded, uses device-independent color, forbids encryption, audio, video and JavaScript, and mandates XMP metadata.
- Ghostscript documentation: PDF settings presets: the screen, ebook, printer and prepress presets, including color-image targets of 72, 150, 300 and 300 dpi, the 1.5 downsample threshold, default image filters and font subsetting.
Frequently asked questions
What is font subsetting?
Subsetting embeds only the characters used in the document rather than the entire font, so the text looks the same while taking far less space.
Can a PDF have files hidden inside it?
Yes. PDFs can contain embedded attachments. Check the attachments panel of your viewer, and remove anything the recipient does not need.
Is it safe to remove metadata?
Usually yes, and it can help privacy. Keep the original, and do not remove data that your workflow or a regulation requires.
Does rewriting a PDF break digital signatures?
It can. A full rewrite changes the file after signing, so avoid it on signed documents unless you will re-sign them.