Tips & Tricks

How to Compress Text and Images Differently in the Same PDF

Most PDF Compression tools apply a single set of settings to every page in the document. Every image gets downsampled to the same resolution, and every text element gets the same compression algorithm. This uniform approach works adequately for documents where all pages are similar, such as a text-only report or a photo-only portfolio. For documents that mix text-heavy pages with image-heavy pages, a single compression setting either over-compresses the text pages unnecessarily or under-compresses the image pages.

Applying different compression to text regions and image regions within the same PDF produces a better result than uniform compression. Text remains sharp and readable because it is compressed with a lossless algorithm designed for vector content. Images are downsampled aggressively because they tolerate resolution reduction better than text. The total file size reduction is greater than uniform compression applied conservatively enough to keep text readable, and the visual quality of both content types is preserved at the level each requires.

WukongPDF's PDF Quality and compression tools apply intelligent per-element compression that treats text and images differently within the same document. For manual control over per-element settings, Adobe Acrobat Pro's PDF Optimizer provides the most granular controls.

How to Compress Text and Images Differently in the Same PDF

Why Uniform Compression Damages Mixed-Content PDFs

Text is unforgiving of compression artifacts. A single character rendered at low resolution becomes illegible quickly. The letter 'e' at 72 DPI may be only 4 to 6 pixels tall, and any further downsampling turns it into an unrecognizable smudge. Images, by contrast, contain far more pixels than needed for screen display. A photograph at 300 DPI contains roughly 16 times as many pixels as the same image at 75 DPI. Downsampling images to screen resolution removes redundant pixels without perceptible quality loss for most viewing scenarios.

A uniform compression pass that downsamples everything to 150 DPI makes text slightly fuzzy while leaving significant image compression on the table. A uniform pass that downsamples to 72 DPI makes images adequately small but renders text nearly illegible. The correct approach is to process text areas with a lossless compression algorithm such as Flate or ZIP and leave their resolution at the original value, while processing image areas with lossy JPEG compression at a reduced DPI. The two content types travel through different optimization paths within the same compression operation.

WukongPDF

Try Compress PDF

No installation needed. Works directly in your browser.

Get Started โ†’

Configuring Per-Element Compression in Adobe Acrobat Pro

Open the PDF in Acrobat Pro and go to File, then Save As Other, then Optimized PDF. The PDF Optimizer dialog opens with a left panel listing compression categories. Click Images to configure image compression. Set the downsampling target for color images to 150 DPI with Bicubic Downsampling, which produces clean results for photographs. Set monochrome images to 300 DPI with JBIG2 lossless compression to preserve text sharpness in scanned documents. Under Compression, choose JPEG for color images at Medium quality and ZIP for monochrome images.

The critical setting for text protection is in the Transparency and Cleanup sections, not the Images section. Under Cleanup, check Compress document structure and Remove unused objects, both of which reduce file size without affecting visible content. Leave Discard objects unchecked for text-related objects. The Fonts section of the optimizer controls font embedding and subsetting. Ensure that Embed all fonts is unchecked unless needed, and that Subset embedded fonts is checked. Font subsetting includes only the characters actually used in the document rather than the entire font file, which can reduce font data by 70 to 90 percent for documents that use only a small subset of a large font's character set.

After configuring the settings, click OK and save the optimized file under a new name. Compare the original and optimized PDFs side by side at 100 percent zoom. Text should be indistinguishable between the two versions. Images may show slight softening at the chosen downsampling resolution, but no visible compression artifacts such as blocky edges or color banding.

Using Ghostscript for Command-Line Control

Ghostscript provides command-line access to per-element compression settings through its device parameters. The ColorImageResolution, GrayImageResolution, and MonoImageResolution parameters set the downsampling targets for each image type independently. The ColorImageFilter parameter sets the compression algorithm for color images. A typical Ghostscript command for mixed-content compression is: gs -sDEVICE=pdfwrite -dCompatibilityLevel=1.7 -dPDFSETTINGS=/printer -dColorImageResolution=150 -dMonoImageResolution=300 -dColorImageFilter=/DCTEncode -dGrayImageFilter=/DCTEncode -dMonoImageFilter=/CCITTFaxEncode -sOutputFile=output.pdf input.pdf.

In practice, the /printer PDFSETTINGS preset applies 300 DPI for all image types, which is higher than needed. Override specific parameters after the preset to lower color image resolution while keeping monochrome resolution high. Ghostscript processes the PDF according to the parameter hierarchy, with explicit parameters overriding preset defaults. The command-line approach is scriptable and free, making it suitable for batch processing mixed-content PDFs on a server or as part of an automated publishing pipeline.

Content TypeCompression StrategyTypical Reduction
High-resolution photosDownsample to 100-150 DPI, JPEG medium quality50-80% for photo pages
Text and vector graphicsFlate/ZIP lossless compression, keep original resolution10-30% for text pages
Mixed pagesApply per-image settings, preserve text vectors30-60% overall

Verifying Compression Results by Content Type

After compression, verify that text and PDF Images received the intended treatment. In Acrobat Pro, use the Output Preview tool under the Print Production menu to inspect individual image resolutions. The Object Inspector lists every image on the current page with its effective resolution after compression. Confirm that color photos show the target resolution such as 150 DPI and that screenshots containing text show a higher resolution such as 200 to 300 DPI. The page content audit confirms that the per-element settings were applied correctly.

For a quick visual check, zoom to 200 percent on a text area. Characters should remain crisp with no softening at the edges. Then zoom to 200 percent on a photographic image. Some pixelation at extreme zoom is expected and acceptable because the image was downsampled for normal viewing distances. Switch between the original and optimized PDFs using the Compare Files tool in Acrobat Pro to generate a visual diff that highlights pixel-level differences. The diff should show changes in image areas and no changes in pure text areas.

Compressing text and images differently within the same PDF is the professional approach to producing a document that is both small enough for easy distribution and sharp enough for comfortable reading. The five minutes spent configuring per-element compression settings in Acrobat Pro's PDF Optimizer produces a measurably better result than any one-size-fits-all compression preset. For documents distributed primarily on screen, the per-element approach delivers the sharp text readers expect alongside the fast loading that mobile viewers appreciate.

Creating a Reusable Compression Preset for Mixed-Content PDFs

If you regularly produce mixed-content PDFs from the same source, such as a monthly report with charts and commentary, save the per-element compression settings as a reusable preset in Acrobat Pro. In the PDF Optimizer dialog, configure all settings for your typical document type, then click the Save button at the top of the dialog and name the preset, such as Monthly Report Optimized. The next time you need to compress a similar document, open the PDF Optimizer, select the saved preset from the Settings dropdown, and click OK. The entire optimization applies in one click without reconfiguring individual settings.

For teams that share compression standards, export the preset as a file and distribute it to all team members. Place the preset file in the Acrobat Pro settings folder on each computer. Every team member then applies identical compression settings, producing consistent output across documents created by different people. Consistent compression prevents the scenario where some team members send sharp but large PDFs while others send small but fuzzy ones, each believing their approach is the correct one.

Handling Scanned PDFs With Mixed Page Types

A scanned PDF where some pages are crisp text and others are grainy photographs presents a challenging compression scenario. Text pages need high monochrome resolution for sharpness. Photo pages need moderate color downsampling to control file size. A single compression setting applied to the entire document sacrifices either text sharpness or photo quality.

The solution is to separate the document by page type before compression. Split the PDF into two temporary files: text-only pages and photo-only pages. Compress each with settings optimized for its content. Then merge the optimized files back into a single PDF. This three-step workflow takes two extra minutes but produces the best result for each page type. Automate the split-compress-merge process with a script for recurring mixed-content documents. The split-compress-merge workflow is the manual equivalent of the per-element compression that Acrobat Pro does internally, giving you the same result through a slightly longer but fully controllable process.

Across most tools, the ability to compress text and images with different settings within the same document is what separates acceptable PDF output from excellent PDF output. For any document that will be read on screen rather than printed, sharp text is non-negotiable. Readers notice blurry text immediately. A slightly softer photograph at 150 DPI is barely perceptible. Respecting the different quality requirements of text and images produces a document that feels professionally produced regardless of its file size. Applying different compression to text and images within the same PDF rewards the effort with a document that loads quickly, reads comfortably, and represents its content at the quality level each content type demands.

WukongPDF

Try Compress PDF

No installation needed. Works directly in your browser.

Get Started โ†’