Tools

How to Shrink a PDF Without Destroying the Text Layer

Published on Sep 14, 20265 min read

Featured image for How to Shrink a PDF Without Destroying the Text Layer

Where the megabytes actually are, why some compressors quietly rasterise your document, and the thirty-second test that tells you which happened.

A PDF that will not fit in an email attachment is one of the most reliably annoying problems in office work, and most of the advice for fixing it quietly destroys something valuable. Understanding what is actually taking up the space tells you which fix to use — and which ones to avoid.

Two completely different kinds of PDF

PDFs that look identical on screen can be built in fundamentally different ways, and the difference determines everything about compressing them.

A digitally created PDF — exported from Word, InDesign, a browser or an accounting package — stores text as text. Characters are real characters, positioned on the page, drawn using embedded font data. Lines and shapes are vectors. You can select the text, search it, and copy it. These files are usually small to begin with, because text is cheap to store.

A scanned PDF is a stack of photographs. The scanner produced an image of each page and wrapped the images in a PDF container. There is no text in the file at all, only pixels that happen to look like text. These are the files that arrive at 40 megabytes, because they are essentially a folder of high-resolution photos.

Before compressing anything, try selecting a line of text. If you can highlight individual words, it is a digital PDF. If your cursor draws a box over the whole page, it is a scan. The right approach differs completely from there.

Where the megabytes actually are

In almost every oversized PDF, images are the problem. Text with embedded fonts is remarkably compact — a hundred pages of pure text is often under a megabyte. A single photograph at print resolution can be several times that.

Fonts are the second contributor, and the one people never think about. A PDF can embed complete font files so it renders identically everywhere. A full font family with multiple weights adds up, particularly when the document only ever uses a few dozen characters from each.

The third is accumulated debris: revision history, unused objects from editing, duplicated resources when documents were merged, embedded thumbnails, and metadata. A file that has been merged, split and re-saved several times can carry a surprising amount of material that renders nothing.

What good compression does

Sensible PDF compression works on those three things without touching the page structure.

It downsamples images to a resolution appropriate for the purpose. A photograph at 600 dots per inch is right for professional printing and pointless for a document that will be read on a screen — 150 DPI is generally fine for screen reading, and 300 is more than enough for an office printer. Halving the resolution quarters the pixel count, which is where the large savings come from.

It re-encodes images more efficiently, typically as JPEG at a sensible quality for photographs, while leaving line art and screenshots alone because lossy compression damages them badly.

It subsets fonts, keeping only the characters the document actually uses rather than the full typeface, and it removes unreferenced objects and duplicate resources.

Crucially, all of this leaves the text layer intact. The document stays selectable, searchable, and readable by screen readers.

The fix that quietly ruins the document

The approach to avoid is rasterising the whole document — converting each page into a single flat image and rebuilding the PDF from those.

It does make the file smaller, and it is what some tools do when asked to compress aggressively. It also destroys everything that made the PDF useful as a document. Text stops being selectable and searchable. Copy and paste produces nothing. Screen readers find no content at all, which makes the document inaccessible in a way that carries legal weight in many jurisdictions. Zooming in reveals soft, blurry type rather than crisp vectors, because the text is now pixels.

The giveaway is exactly the test from earlier. Compress a file, then try to select a sentence. If you no longer can, the tool rasterised it, and you should keep the original.

Scanned documents need a different approach

For a scan, downsampling is the main lever and the tradeoff is directly visible: reduce resolution too far and the text becomes hard to read, especially small print and footnotes.

Colour mode matters more here than anywhere else. A scanned page of black text on white paper scanned in full colour carries three colour channels describing what is essentially a two-tone image. Converting to greyscale typically cuts the size substantially with no meaningful loss, and for clean printed text a bitonal conversion can be dramatic — though it is unforgiving of faint handwriting, highlighter and photographs.

The genuinely valuable step for scans is OCR, which analyses the images and adds an invisible text layer behind them. The pages still look like scans, but the document becomes searchable, selectable and accessible. It rarely shrinks the file — it may grow it slightly — but it converts a stack of pictures into something that functions as a document. For any scan you intend to keep, it is worth more than the size reduction.

Practical habits

Compress once, from the original. PDFs suffer the same generational loss as images: each round of lossy re-encoding degrades the embedded pictures further, and repeatedly compressing the same file produces visible mush.

Export at the right settings in the first place rather than fixing it afterwards. Most applications offer a screen or web export preset that downsamples images appropriately, and using it avoids the problem entirely.

Keep the master. Whatever you send, keep the full-resolution original somewhere — you cannot recover detail from a compressed copy, and the day you need to print something you only have at 96 DPI is genuinely irritating.

And check the result before sending: open it, select some text, zoom to 200 percent, and look at the images. Thirty seconds of checking prevents sending a client a document that looks like a fax.

Share on XShare on LinkedInShare on WhatsApp

Looking for free tools? Try our word counter, image compressor, or password generator— or browse all 100+ free tools in our Tools section.

Free Tools You Might Find Useful

Need help building your website?

CodexStudio builds fast, SEO-optimized websites for businesses in Islamabad and worldwide.

About the Author

Saif Ali

Saif Ali

Founder & Lead Developer at CodexStudio

Saif builds SEO-focused websites, web apps, and product systems for startups and businesses in Pakistan and worldwide.

More from our blog