Searchable PDF File Size: Why It Changes, How to Shrink It
By Schema LawPublished Updated
Searchable PDF file size changes because the conversion adds a small text layer and, depending on the tool, stores the page pictures again, which can move the total up or down. To shrink the file and keep its text, reduce the pictures with a PDF editor's compression settings, and never by printing or flattening the pages.
The size question comes up at two moments: when the searchable copy lands next to the scan and the two numbers differ, and when the file will not fit an email or an upload form. Both come down to the same fact about what fills a scanned PDF.
After the file is smaller, search a contract clause heading, a medical provider name, and a damages figure you can see. Compare the hit count with the copy you started from. Then read each line on the page image at high zoom. If a claimant name or a liability amount still searches while the print under it turns soft, the pictures changed and the text stayed.
Does making a PDF searchable make the file bigger?
Adding a text layer adds bytes, so a conversion that leaves the page pictures alone returns a slightly larger file. Whether your file ends up bigger or smaller overall depends on what the tool does to the pictures in the same pass, and that effect can outweigh the text many times over in either direction.
There are three outcomes, and each one tells you something about what the tool did.
| The searchable copy is | What happened to the pictures | What to do |
|---|---|---|
| A little bigger than the scan | Left as they were; text and perhaps a font were added | Nothing; this is the plain case |
| Smaller than the scan | Stored again at lower resolution, in fewer colours or with tighter compression | Compare a page with the original at high zoom |
| Much bigger than the scan | Stored again in a less compact form, or the pages were rebuilt | Check the tool's output settings before converting the next file |
"A little bigger" means a few kilobytes per page. On a 40-page lease that started at 3.1 MB, a copy of 3.3 MB fits the plain case. A copy of 1.2 MB or 14 MB does not, and the difference is in the pictures.
The much-bigger case is the least expected. It happens when a tool decodes each compact black-and-white page picture and saves it again as a greyscale or colour image, or wraps each page in a second full-page image. The words on the page look the same, and the file has grown several times over for no gain.
Compare the two sizes for every conversion, as a habit. Right-click each file, read the size, and write both numbers in the file note. The homepage describes Schema Law's searchable PDF as your original file with a hidden text layer; whatever tool you use, weigh the upload against the export yourself, because the comparison tells you which of the three cases you are in.
How much of a searchable PDF's size is the text layer?
Very little. A page of dense print holds a few thousand characters, and stored with positions and compressed, that comes to a few kilobytes. The picture of the same page, scanned at 300 dots per inch, runs from tens of kilobytes in black and white to a megabyte or more in colour.
The arithmetic shows why. A letter-size page scanned at 300 dots per inch is 2,550 dots wide and 3,300 dots high, which is 8,415,000 dots. Before compression:
| Scan mode | Stored per dot | Raw size of one page |
|---|---|---|
| Black and white | 1 bit | About 1 MB |
| Greyscale | 8 bits | About 8 MB |
| Colour | 24 bits | About 25 MB |
Compression brings each of those down a long way, and black-and-white text pages compress hardest of all. The text of the same page, at 3,000 characters, is 3,000 bytes before compression. Even after adding the instructions that place each word, the text is a rounding error next to a colour picture.
Take a 200-page set of medical records as an illustration with round figures. At 5 KB of hidden text per page, the text layer is 1 MB. If the pages are black-and-white scans at 60 KB each, the pictures are 12 MB and the file is about 13 MB. If the same pages were scanned in colour at 800 KB each, the pictures are 160 MB and the text is still 1 MB. Your own figures will differ. The proportion is the point: the pictures decide the size.
One more item can ride along with the text. Hidden text is written in a font, and a tool may embed that font in the file so every reader can map the characters. A font is added once for the whole file, so it matters on a two-page letter and vanishes on a long file.
To see the text's share in a file of your own, export the text to a plain text file and look at its size. That number is close to what the layer holds in characters. Some PDF editors can also report how a file's bytes divide among images, fonts and page content; look for a space or size audit in yours.
The reasons a scan is heavy in the first place are set out in the post on why a scanned PDF is so many megabytes.
Why did the searchable PDF come back smaller than the scan?
A searchable PDF comes back smaller than the scan when the tool stored the page pictures again while it added the text. A text layer cannot shrink anything. A smaller file means the pictures now have a lower resolution, fewer colours, a tighter compression method, or the file shed data it had been carrying unused.
Four mechanisms account for it.
- Downsampling. The tool reduced each picture from, say, 600 dots per inch to 300 or 150. Fewer dots, fewer bytes.
- Colour reduction. Colour pages were saved as greyscale, or greyscale as pure black and white.
- A different compression method. The same dots were packed more tightly. Some methods are lossless, meaning the picture is rebuilt dot for dot. Others are lossy and trade away detail you may or may not see. Some tools also split a page into a sharp layer for lettering and a soft layer for background, and compress each separately.
- Housekeeping. A PDF that has been edited and saved repeatedly can carry earlier versions of its content and objects no page uses. A tool that writes the file out fresh drops them. This kind of saving costs nothing visible.
Which one you got matters when the file is a record. What each of these changes does to the look of a page, and how to show that a searchable copy matches its source, belongs to the post on whether OCR changes the original PDF. For the choices a conversion offers on downsampling and compression, see the post on converting a scanned PDF to a searchable PDF.
A quick look tells a harmless saving from a costly one. Put the page with the smallest print, and a page with a stamp or a signature, beside the same pages of the scan at high zoom; the full routine is under proving the searchable copy shows the same pages as the original.
If you cannot tell the pages apart, the saving came from compression you can live with or from housekeeping. If the copy is visibly rougher, keep the scan as the record and treat the smaller file as a reading copy.
Shrinking a searchable PDF for email without stripping its text
Shrink the pictures and leave the page structure alone. Use the reduce-size or optimize command in a PDF editor, choose image downsampling and compression, switch off every option that would discard or flatten content, and save under a new name. Then test search before you attach the file.
Start by finding the real target. Your mail system has an attachment limit and so does the recipient's, and the lower one governs. Leave headroom, because an attachment is encoded for transit. The Internet mail standard says of the Base64 encoding used for attachments that "the encoded data are consistently only about 33 percent larger than the unencoded data" (RFC 2045, section 6.8). A 19 MB PDF can therefore fail a 25 MB limit once it is encoded.
Work down this list and stop as soon as the file fits. The steps are ordered from least to most effect on how the pages look.
- Save the file fresh. Use Save As, or the editor's plain optimize pass with image options off. This removes leftover data and changes no picture.
- Remove what does not belong. Duplicate pages and scanner separator sheets add weight. Record what you removed.
- Convert colour pages that carry no colour information. A black-and-white contract scanned in colour is three times heavier in raw terms than the same page in greyscale. Leave pages with coloured ink, stamps or highlighting in colour.
- Downsample. Lower the resolution of the pictures one step at a time. After each step, zoom to 200% on the smallest print in the file. Stop at the last setting where it reads cleanly.
- Tighten compression. Raise the compression level on the images. Check the same small print again.
- Split the file. If the pages cannot take more reduction, send the document in parts. The post on splitting a searchable PDF covers cutting a file so each part keeps its text.
- Send a link. Where your firm's policy and the recipient's allow it, a download link avoids the limit altogether and lets you send the full-quality file.
A worked reduction
Suppose a 180-page colour scan of a lease file for the fictional tenant Corvane Dental comes back from OCR at 38 MB, and the client's mail system takes 20 MB. Allowing for encoding, you aim for 14 MB.
| Step | Size after | Search test |
|---|---|---|
| Starting file | 38.0 MB | "Corvane" 212 hits |
| Saved fresh | 37.4 MB | 212 hits |
| 150 text-only pages to greyscale | 24.9 MB | 212 hits |
| Downsampled from 300 to 200 dots per inch | 13.6 MB | 212 hits |
The figures are invented for the example. The pattern to copy is the right-hand column: one search repeated after every step, so that if the count ever changes you know which step did it.
Court filing systems set their own limits and their own rules about how a filing may be divided. Those are covered in the section on file size limits and scanned attachments, and you should read your own court's.
Which size-reduction settings quietly remove or damage the text layer?
Size-reduction settings remove the text layer when they rebuild each page as one flat picture, and a few optimizer options that sound harmless discard hidden content. Options that discard invisible or hidden content, options that remove fonts, and "smallest file" presets are the ones to watch.
The trouble with all of them is that the result looks perfect. The pages are the same, the file is smaller, and nothing reports that the words are gone.
| Route or setting | What it does to the page | Effect on the text layer |
|---|---|---|
| Optimizer option to discard hidden, invisible or non-displayed content | Removes content that does not show | At risk, because OCR text is invisible by design |
| Optimizer option to remove or unembed fonts | Takes fonts out of the file | Text may remain but copy as wrong characters; test |
| A "maximum" or "smallest file" preset | Applies several of these at once | Unknown until tested |
| An online compressor | Whatever its maker chose | Unknown until tested |
| A setting that turns each page into an image | Replaces the page with a picture | Lost |
Shrinking a file by printing it to PDF, flattening it or saving its pages as images belongs to the last row. Those routes are explained in the post on a PDF that is no longer searchable, under printing to PDF, flattening and saving as an image.
An online compressor raises a second question before the technical one, which is whether the document should leave the office at all; the post on whether it is safe to upload client documents to an OCR tool lists what to ask.
Damage is harder to notice than removal. A file whose text was damaged still lets you select words, but a search for a name returns nothing and pasted text comes out as symbols. Test with a paste as well as a search.
Heavy downsampling does not touch the layer at all. It leaves you with the opposite mismatch: text that still searches, behind a picture too coarse to read comfortably. That file finds the page and then fails the person who opens it.
If a file has already lost its text and you need to work out where, the post on a PDF that is no longer searchable traces the workflow step by step and covers getting the text back.
A size and search check to run after shrinking a searchable PDF
Compare the shrunk file with the file you started from on five points: size, page count, search hits, pasted text and legibility. Run all five every time, because a stripped text layer changes nothing you can see on the page and a missing page changes nothing you would notice in a long file.
Keep the starting file open beside the new one and fill in a sheet like this:
| Check | How | Pass |
|---|---|---|
| Size | Read both file sizes | New file is under your target with headroom for encoding |
| Page count | Read the page counter in both | Identical |
| Name search | Search one surname in both | Same hit count |
| Number search | Search one amount or date exactly as printed | Same hit count, same page |
| Late-page search | Search a word visible on a page in the last tenth of the file | Found on that page |
| Paste | Copy one full page from the new file into a text editor | Readable sentences, matching the old file |
| Small print | Zoom to 200% on the smallest type in the file | Legible without guessing |
| Marks | Zoom to 200% on one stamp and one signature | Still clear, colour kept where it matters |
| Second program | Open the new file in a different PDF reader and repeat one search | Same result |
A failure on any search line means the reduction went through a route that harmed the text. Discard the new file, return to the starting file, and reduce again with the offending option off. Do not try to repair the shrunk copy by running OCR over it. Recognition would be working from a coarser picture than the one behind the text you already had.
A failure on the legibility lines means you reduced too far. Go back one step.
When the file passes, name it so nobody confuses it with the full-quality copy, for example Corvane_lease_file_ocr_email.pdf, and keep the full copy in the matter folder. A line in the file note such as "emailed reduced copy, 13.6 MB, 200 dpi, search verified on Corvane and 4,250.00" tells the next person which version went out and that it was tested. For how a searchable copy is produced in the first place, the homepage shows how the upload and export steps work.