Preview can compress a PDF on macOS, but the same JPG-recompression logic that drives its Reduce File Size filter can run inside any modern browser tab without uploading the document. The macOS Preview app applies a Quartz filter that re-encodes embedded raster images at lower quality, which is exactly why text-heavy PDFs often refuse to shrink — only the picture data is touched, not the page structure, fonts, or text streams. A browser-based Compress PDF tool applies the same idea on Windows, Linux, ChromeOS, or any other platform where Preview is not installed. It loads the file locally, walks each page's image objects, and re-encodes only the eligible JPEG streams at a balanced quality and a 1400-pixel maximum dimension. Because nothing leaves the browser tab, the workflow mirrors Preview's open, compress, save rhythm, except it works on any operating system and produces an honest size report before offering a download. That combination — Preview's idea, any browser's reach — is the practical answer for anyone who searched for a Preview-based workflow but needs it to run somewhere else.

What Preview actually changes when it compresses a PDF
macOS Preview exposes a single menu command for shrinking PDFs: File > Export, then pick Reduce File Size from the Quartz Filter popup. Behind the scenes, that filter rewrites the embedded raster images inside the document at a lower quality setting, drops a small amount of metadata, and saves the result back to disk under the same name. The page count, page geometry, fonts, links, and text streams are not rewritten, which is the reason a text-only PDF usually does not shrink in Preview — there are no embedded raster images to re-encode.
The filter also has no concept of a target size and no lossless option, so the trade-off is permanent: you give up some image quality in exchange for whatever byte reduction Quartz produces. Understanding that boundary matters because every bounded browser-based compressor works on the same principle: only the embedded raster images can be made smaller without redrawing the page, and the rest of the document is left structurally intact.
A browser-based alternative that mirrors Preview's approach
If you are on an operating system other than OS X, or you simply do not want to round-trip through Preview, the same idea runs in any modern browser tab with a local Compress PDF tool. You open the page, pick one PDF from your disk, and the tool walks the image objects inside the file using a JavaScript PDF library, re-encodes only the eligible JPEG streams at a balanced quality and a 1400-pixel maximum dimension, and reports both sizes before exposing the download. The source file is never uploaded, no account is required, and the page count and text layer remain exactly as they were.
For readers who specifically searched for a Preview-style workflow, this is the closest portable equivalent: open a file locally, watch it shrink, save it back. If you want a wider walkthrough of the same approach, the guide on how to compress a PDF easily in your browser covers the same ground in more detail.
How to compress a PDF in your browser instead of Preview
- Open the Compress PDF page in your current browser tab. Chrome, Edge, Safari, and Firefox all support the underlying file APIs.
- Click the file picker and choose one PDF from your local disk. The tool accepts a single file at a time and enforces a 25 MB size cap.
- Select the Compress PDF action and wait while the tool enumerates the embedded image objects inside the file and re-encodes the eligible JPEG streams. Everything runs in the current tab — nothing is uploaded.
- Read the reported input and output sizes shown next to the result. If the new file is smaller, a download button appears. If no eligible image shrank, the tool reports an honest no-shrink result and offers no download.
- Click Download to save the verified PDF. The tool reopens the output with a PDF viewer inside the same page before showing the link, so a malformed result is never presented as a success.
- Open the downloaded file, compare it against the original side by side, and keep the original until you have confirmed the output looks correct.
Which embedded images the tool is allowed to change
The tool is deliberately narrower than a general-purpose PDF optimizer. It only re-encodes unmasked JPEG images that use DeviceRGB or DeviceGray color data and have no unusual decode parameters. Everything else — JPX and JPEG 2000 streams, CMYK images, Indexed color spaces, masked images, ImageMask objects, and any image with a non-standard decode array — is left alone. This is not a guess: the tool inspects the PDF stream dictionary before touching anything and skips anything outside that allow-list instead of forcing a replacement.
For each eligible image, the longest side is downscaled to 1400 pixels and re-encoded at JPEG quality 0.70. The candidate is then compared byte-for-byte against the original stream, and the original is kept whenever the candidate is not actually smaller. This is why the tool can promise an honest size report: only confirmed-smaller images are swapped in at the same indirect reference inside the PDF structure.
Why a text-heavy PDF often refuses to shrink
A PDF that contains only a text layer, vector shapes, and fonts has no JPEG image objects for the tool to re-encode, so the output size will equal the input size — and the tool reports that instead of offering a download. The same is true for any PDF whose embedded images are already heavily compressed or stored in a format the tool cannot safely rewrite, such as JPEG 2000, CMYK scans, masked images, or images with decode parameters.
Preview behaves the same way: it is a re-encoder of embedded rasters, not a general-purpose stream optimizer. The practical guidance is to use this browser tool for scanned or photo-heavy documents where a visibly smaller local copy is acceptable, and to switch to a desktop tool when you need arbitrary stream compression, archival conformance, or guaranteed lossless output.
Safety limits and verification before download
Because everything happens in the browser tab, four hard caps keep the operation bounded: one PDF at a time, a 25 MB file size cap, at most 80 eligible image objects, and no more than 100 megapixels across all decoded images combined. A PDF that exceeds any of those caps is rejected up front instead of being silently truncated, so the tool never pretends to succeed on a file it cannot fully process.
After the rewrite, the tool saves the new PDF, reopens it with a PDF viewer inside the same page, and only then exposes the download link. This verification pass is what stops a malformed result from being offered as success — if the output cannot be reopened or the page count has drifted, the tool refuses to present a download. The Canvas toBlob API is the underlying mechanism that produces each candidate JPEG, and PDF.js handles the reopen-and-verify step, both running inside the same tab without sending any bytes to a server.
When Preview and this tool are not enough
If you need a specific target size, arbitrary stream compression, archival conformance, or PDF/A validation, neither Preview nor this bounded browser tool is the right choice. Preview does not accept a target size at all, and the browser tool does not promise one — it only reports what the JPG re-encoding actually achieved. A desktop optimizer can rewrite content streams, downsample fonts, and produce a PDF/A profile, which is beyond the scope of an in-browser re-encoder. The table below summarizes where each option fits so you can pick the right one before you start.
| Use case | Preview on macOS | Browser Compress PDF | Desktop optimizer |
|---|---|---|---|
| Photo or scan-heavy PDF, one file, under 25 MB | Works, lowers image quality | Works, re-encodes eligible JPGs | Works, may add overhead |
| Text-only PDF with no embedded images | Usually no reduction | Honest no-shrink result | May shrink via stream tuning |
| CMYK, masked, or JPEG 2000 images | Re-encodes anyway, may distort | Skipped safely | Handled with full control |
| Need a specific target file size | Not supported | Not supported | Often supported |
| Archival or print-ready conformance | Not guaranteed | Not guaranteed | Available in tools like Ghostscript or Acrobat Pro |
| Cross-platform without macOS | Not available | Works in any modern browser | Depends on the tool |
For the common "I want a smaller copy of this scanned PDF without sending it anywhere" task, the browser tool covers the same ground as Preview's filter and runs anywhere a modern browser is available.