Guide · PDF
How to compress, merge and convert PDFs without uploading them
By NREX Group · Published · Updated · Sources last checked: · 12 min read
Drafted with AI assistance and checked against the sources listed at the end.

A PDF looks like one thing but is a container: numbered objects for pages, fonts, images and a record of document details, which a viewer assembles into pages. Its size, what it reveals and what survives an edit all follow from what is inside. This guide goes through what makes PDFs large, what Lossless. Compression that can be undone exactly: the decoded file has the same pixels or bytes as the original. PNG and the plain 'repack' step of a PDF compressor are lossless, so the saving is limited to what repetition and structure allow. Read the guide and Lossy. Compression that throws some detail away to get a smaller file, so the decoded result only approximates the original. JPEG is the best-known example; each further lossy save can remove a little more. Read the guide compression each do to one, what merging, splitting and converting leave behind, and what “processed in the browser” means in practice.
The numbers come from two places. Some are published tests on the GoConvertFiles tool pages, which name the browser used. The rest were measured for this guide on a synthetic scanned page, described where it appears.
What makes a PDF large
A PDF file is a sequence of objects. Most of the heavy ones are streams, blocks of bytes that name the filter that compressed them. The standard lists Flate (zlib/deflate) and LZW for any data, DCT (based on JPEG) and JPEG 2000 for images, and CCITT and JBIG2 for one-bit scans.[1] Three things usually decide the total.
Images. A typed page is stored as character codes and drawing instructions. A scanned or photographed page is a grid of pixels, and the pixel count rises with the square of the scan resolution. Image-heavy PDFs are large for that reason.
Fonts. Fonts are embedded so a page looks the same everywhere. The format allows font subsets, which keep only the glyphs a document uses; a subset’s name carries a six-letter tag followed by a plus sign.[1] Ghostscript’s PDF writer subsets fonts by default, which is one of the things desktop optimisers do.[2]
Structure. Since PDF 1.5, many small objects can sit inside one compressed object stream, which is the main change the lossless rewrite described below makes.[1] Its gain comes from the structure, not from the pixels.
Resolution and DPI
DPI / PPI. Dots (or pixels) per inch: how many pixels a scan or an image holds per inch of paper. An A4 page is about 2,480 by 3,508 pixels at 300 DPI and about 1,240 by 1,754 at 150 DPI, a quarter of the pixels. Read the guide says how many pixels a scan holds per inch of paper. PDF measures pages in points, 72 to the inch by default, so an A4 page is about 595 by 842 points.[1] At 72 DPI that is one pixel per point, 0.5 megapixels; at 300 DPI it is 8.7 megapixels, seventeen times as many.
To see what that does to bytes, a synthetic A4 page was built for this guide: eleven-point Times New Roman lines on an off-white background with light grayscale grain to imitate a scanner. It was rendered at four resolutions and saved three ways (Pillow 11.3.0). A real scan varies with paper, color and content, so the shape of the result matters more than the exact values.
| DPI | Pixels | Raw RGB | PNG (lossless) | JPEG q85 | JPEG q50 |
|---|---|---|---|---|---|
| 300 | 2,481 × 3,507 | 26.1 MB | 9.09 MB | 1.96 MB | 796 KB |
| 150 | 1,240 × 1,754 | 6.52 MB | 2.50 MB | 594 KB | 268 KB |
| 96 | 794 × 1,122 | 2.67 MB | 1.10 MB | 279 KB | 135 KB |
| 72 | 595 × 842 | 1.50 MB | 632 KB | 169 KB | 85 KB |
Quartering the pixels (300 to 150 DPI) cut the JPEG from 1.96 MB to 594 KB, a factor of 3.3 rather than 4, because JPEG’s efficiency changes with detail. Ten such pages come to about 19.6 MB at 300 DPI, 5.9 MB at 150 DPI, 2.8 MB at 96 DPI and 1.7 MB at 72 DPI: the measured page sizes times ten.
Smaller is not free. At 72 DPI an eleven-point font is eleven pixels tall, so thin strokes and small print have little to work with. Ghostscript’s presets show where desktop software draws its lines: /screen uses 72 DPI for color images, /ebook 150 and /printer 300, and the manual warns that any preset alters the input and can give poorer quality than leaving the file alone.[2]
Lossless and lossy compression
The PDF standard draws the same line as everyone else. Compression is lossless when no data is lost, and lossy when some is; lossy methods apply only to sampled image data, while lossless ones work on any stream.[1] Flate is lossless; the DCT filter reproduces image data that only approximates the original.[1]
The PDF Compressor stays on the lossless side. It opens the file with pdf-lib and saves it again using object streams, and returns the original if the result is not smaller. Five test files, run through the same calls the tool makes, show how small the effect is:
| Test PDF | Before | After | Saving |
|---|---|---|---|
| 2-page report (ReportLab) | 2,853 | 2,197 | 23.0% |
| 1 page printed from Chrome | 19,502 | 16,936 | 13.2% |
| 1 page from the macOS print system | 12,908 | 12,327 | 4.5% |
| 5 pages of uncompressed text | 30,577 | 29,355 | 4.0% |
| 3 pages, one photo each | 360,494 | 359,577 | 0.3% |
The pattern follows from the stream types above. When the large objects are already JPEG streams there is nothing for a lossless pass to squeeze, so the saving is the structural overhead, a few kilobytes. A lossless result is still worth knowing about because nothing in it has changed: the text stays text and each pixel is the original.
The lossy route trades pixels for bytes, either by downsampling or by re-encoding JPEG at a lower quality, and each re-encode adds loss on top of the last one, so a copy made from the original file keeps more detail than a copy of a copy.
Compressing to a target size
Compress PDF to Size takes a limit and works in two stages. It runs the lossless rewrite first and stops if that is already under the target. If not, it draws every page to an image and rebuilds the PDF from the images. It tries four resolutions in order, 150, 120, 96 and 72 DPI (about 2.18, 1.39, 0.89 and 0.50 million pixels per A4 page), and at each one searches JPEG qualities between 20% and 92% for the highest that fits.
A worked example with the measured page sizes. Ten scanned pages at 300 DPI come to about 19.6 MB. For a 5 MB target, 150 DPI at quality 85 is still about 5.9 MB, over the limit, so the quality has to drop; quality 50 at the same resolution is about 2.7 MB, which shows there is room before the 20% floor. If even 72 DPI at 20% did not fit, the tool returns the flattened 72 DPI version when that is smaller than the lossless one, otherwise the lossless file or your original, and marks it as not reaching the target.
The cost is what the second stage does: pages become pictures. Text can no longer be selected, searched or copied, links and form fields disappear, and only OCR. Optical character recognition: software that reads the letters in a picture of text, such as a scanned page, and turns them into real text. It guesses, so errors are normal, especially on poor scans. Read the guide can bring searchable text back. OCR software adds a text layer to the page images, and it guesses what the letters are.[6]
Merging, splitting and resizing
PDF Merge copies pages rather than redrawing them, so text stays selectable and images keep their quality. The new file is a fresh document, though, and anything that lives at document level stays behind. On a test PDF with a title, an author and two bookmarks, the merged file had no title or author, zero bookmarks, and a producer field reading pdf-lib. Fillable fields may stop working, and a digital signature is no longer valid, since PDF signatures are computed over a range of bytes of the file and a rewrite produces different bytes.[1]
PDF Split works the other way: the page list 2-5, 8, 10-12 on a 12-page file produces one new PDF holding pages 2, 3, 4, 5, 8, 10, 11 and 12, eight pages in all. A repeated page is dropped and the first mention wins, so 5, 1-3 yields 5, 1, 2, 3, which also makes it a quick way to reorder a short selection.
Putting photos into a PDF raises a page-size question. HEIC to PDF makes each page as large as its photo, with the pixel size read as points. At 72 points to the inch, a 4032 × 3024 photo becomes a 56.0 × 42.0 inch page (142.2 × 106.7 cm), and a 48-megapixel 8064 × 6048 photo becomes 112.0 × 84.0 inches. A viewer scales the page to the window, so nothing looks wrong on screen; printing needs “fit to page”.
Resize PDF goes the opposite way, fitting content into a chosen page size without redrawing anything. The scale is the smaller of the width and height ratios. A4 to US Letter scales the content to 94.1% and leaves about 9 mm bands left and right; A4 to A3 scales to 141.4% with no bands, because the shapes match; A4 landscape to A4 portrait scales to 70.7% and leaves about 74 mm above and below. Text stays text and the file size barely moves.
Converting to and from Word and images
PDF to Word reads the text layer of each page with pdf.js and writes it as plain paragraphs, with a page break after each page.[5] Fonts, bold and italics, images, tables and columns are not carried over. For quoting or translating wording that is the right result; for a Word file that must look like the PDF, a desktop converter that rebuilds layout is the other route.
A scanned page has no text layer, only a picture, so it comes back empty. The missing step is OCR. Optical character recognition: software that reads the letters in a picture of text, such as a scanned page, and turns them into real text. It guesses, so errors are normal, especially on poor scans. Read the guide: recognising the letters in the image and attaching them as text. PDF has a text rendering mode that draws nothing at all (mode 3, “invisible”), which is what allows text to exist on a page without changing how the page looks.[1] OCR tools use text layers of this kind to make a scan searchable.[6] None of the tools mentioned here perform OCR.
DOCX to PDF goes the other way by reading the text of the .docx, building a plain print layout, and opening the browser’s print dialog so the PDF is saved from there. Paragraphs, tabs, Title and Heading 1 to 6 styles and simple tables carry over. Fonts, bold, italics, color, images, headers, footers, footnotes, page numbers and clickable links do not. The output is the text of the document, not its design.
Metadata and passwords
Metadata. Information stored in a file about the file: in a PDF, fields such as title, author, the program that made it and the creation date; in a photo, the camera settings and capture time. It travels with the file unless something removes it. Read the guide is information about the document that sits next to its pages. A PDF can keep it in two places. The document information dictionary holds Title, Author, Subject, Keywords, Creator, Producer, CreationDate and ModDate; XML metadata streams, added in PDF 1.4, are now the preferred method.[1] Many files carry both. Creator names the product that made the original document and Producer the one that converted it to PDF, which is why a merge leaves “pdf-lib” behind.
PDF Metadata Remover clears both places, plus annotation authors and dates, and reports whether each was present. Clearing only the old dictionary would leave an XML packet, and any author name inside it, in place. An embedded file attachment is a separate object and stays in the file, and form field names are kept.
Protect PDF encrypts a copy with a password. It uses AES with a 256-bit key and never writes RC4, which the qpdf manual calls obsolete and insecure; the same chapter says 40-bit encryption is not secure however strong the password, and that AES is the only secure option for the standard security handler.[7] Whoever has the password has full use of the copy, so how hard the file is to open depends on how hard the password is to guess.
Local processing and its limits
A browser lets a page ask the user to select local files and then read their contents, and the page’s JavaScript can work on those bytes in memory.[3] The editing tools here rely on pdf-lib, which creates and modifies PDFs in JavaScript,[4] and on PDF.js, which parses and renders them.[5] The result is built in memory and handed back as a download. An upload-based service has to receive the file to process it, and what happens to the copy afterwards is set by that service’s own policy.
The browser’s developer tools make this checkable: the Network panel lists what a page uploads and downloads,[8] so a request from the page carrying the file’s bytes would show up there (requests made by browser extensions are not listed). Local processing has limits that are easy to overlook:
- The page’s own code still loads from the website, and a few unrelated features (analytics, the contact form) use servers. The Is It Safe? page lists them.
- The device does the work, so very large files and low-memory phones can fail or slow down where a server would not.
- Browser extensions allowed to read pages, and any other software running on the device, can still see a file the page opens. Local processing keeps the file off our servers; it does not protect it on a compromised or shared device.
- The downloaded result is an ordinary file. It keeps whatever content and metadata it has until something removes them, and it is as shareable as any other file.
- Nothing here replaces a signed, certified or archival workflow: merging breaks signatures, and rasterising removes text.
Questions
Why does a PDF sometimes barely shrink in a PDF compressor?
A lossless pass only rewrites how the file is organised, and most of the bytes in a photo-heavy PDF are JPEG image data that is already compressed. On the GoConvertFiles test files the saving ranged from 23.0% on a tiny two-page report to 0.3% on three pages that each held a photo. Larger savings need lossy steps: fewer pixels, a lower JPEG quality, or both.[1]
Why can the text no longer be selected after compressing to a size?
When lossless repacking cannot reach the target, the tool draws every page to an image and rebuilds the PDF from those images. An image of a page holds pixels, not characters, so selection and search stop working. OCR software can add a text layer to such a page afterwards, but it recognises letters by estimation, so it is not the original text.[6]
Does merging PDFs keep bookmarks, title and form fields?
In the merge test, pages, text and images were kept, but a test file's two bookmarks came out as zero, the title and author were gone, and the producer field read pdf-lib. Fillable form fields may stop working and digital signatures stop validating, because a signature is computed over a range of bytes of the original file.[1]
Is a PDF that is edited in the browser uploaded anywhere?
Not for the processing itself. The page reads the chosen file with the browser's File API and works on it in memory, using libraries such as pdf-lib and pdf.js. The page's own code still loads from the website, and a few unrelated features such as analytics and the contact form use servers. The browser's developer tools (Network panel) show which requests a page makes. Browser extensions that can read pages can also see the file.[3, 4, 5, 8]
Is a 1 MB upload limit 1,000,000 bytes or 1,048,576 bytes?
Both conventions exist. A binary megabyte is 1,048,576 bytes, about 4.9% larger than a decimal megabyte of 1,000,000 bytes, so a file that fits one definition can miss the other when it is close to the limit. The compress-to-size tool counts 1 MB as 1,048,576 bytes.
Can a scanned PDF be converted to an editable Word file in the browser?
Only if there is text to read. The PDF to Word tool reads each page's text layer and writes plain paragraphs, so a scanned page, which is one picture, comes back empty. Recognising the letters in the picture is the job of OCR, which these tools do not do.[6]
Sources
Every link below was opened and checked on November 8, 2026. Numbers marked as tool-page tests come from the pages of the tools named; the page-size measurements were made for this guide with Pillow 11.3.0.
- ISO 32000-1:2008 (PDF 1.7), Adobe’s public copy. Standard filters (Table 6), the statement that lossy compression applies only to sampled image data, object streams (PDF 1.5), font subsets (9.6.4), the 1/72 inch default unit, text rendering mode 3, the document information dictionary (Table 317), metadata streams as the preferred method since PDF 1.4, and the byte-range digest used by digital signatures. Accessed November 8, 2026.
- Ghostscript documentation, PDF writer (pdfwrite) parameters. The /screen, /ebook and /printer presets with their image resolutions (72, 150, 300 DPI), the default of subsetting fonts, and the warning that the presets alter the input. Accessed November 8, 2026.
- MDN, Using files from web applications. How web content asks the user to select local files and then reads their contents. Accessed November 8, 2026.
- pdf-lib. A library for creating and modifying PDF documents in any JavaScript environment; the editing tools on this site use it. Accessed November 8, 2026.
- PDF.js (Mozilla). A web-standards-based platform for parsing and rendering PDFs; used here to read text and draw pages. Accessed November 8, 2026.
- OCRmyPDF documentation, Introduction. A definition of OCR, and how adding a text layer to the images in a scanned PDF makes it searchable. Accessed November 8, 2026.
- qpdf manual, PDF encryption. RC4 described as obsolete and insecure, with AES the only secure option for the standard security handler as of the chapter’s 2022 review. Accessed November 8, 2026.
- Chrome for Developers, Inspect network activity. The Network panel, used to see what a page uploads or downloads. Accessed November 8, 2026.