WholeFiles

PDF, plainly

What a browser can and cannot do to a PDF

The exact list of PDF jobs a modern browser handles on its own, the jobs it cannot, and the memory arithmetic that sets the file-size limit.

A PDF site that says "nothing is uploaded" is making a technical claim, and it is worth knowing exactly what stands behind it. Since about 2020 every mainstream browser ships three pieces that together cover most everyday PDF work: a JavaScript engine fast enough to parse a PDF file, a Canvas that can draw pages and encode images, and enough memory to hold a file of tens of megabytes. Two open source libraries do the rest. pdf.js, written by Mozilla and used inside Firefox, draws pages. pdf-lib reads and rewrites the structure of a PDF. This site uses both. Here is what that combination can do, what it cannot, and why.

What works entirely on your device

A PDF is a tree of page objects. Merging, splitting, extracting, deleting and rotating are all edits to that tree. The page content itself is copied across untouched, which has a useful consequence: the output pages are byte for byte the same quality as the input. Nothing is re-encoded, so a 300 dpi scan stays a 300 dpi scan.

Job How the browser does it Quality
Merge two or more PDFs Copies every page object into one new document Unchanged
Split, extract or delete pages Copies the chosen page objects into new documents Unchanged
Rotate pages Changes each page's rotation value Unchanged
PDF to JPG or PNG pdf.js draws each page onto a Canvas, the Canvas encodes the image Set by the resolution you pick
JPG or PNG to PDF Embeds each image as a page Unchanged for a JPG stored upright, which keeps its own colour profile; unchanged for a PNG at 8 bits per channel with no gamma or colour profile of its own; a PNG that has one, or holds 16 bits per channel, is redrawn so it looks as it does on screen; a JPG with a rotation note is turned and saved again at quality 92; other formats are redrawn
Compress a PDF Draws each page, saves it as a JPEG, builds a new PDF from those JPEGs Reduced on purpose
Count pages, read the page size Reads the document structure Not applicable

What a browser tool does not do, and the honest reason

Job Why not
Open a PDF that asks for a password The tools built on pdf-lib refuse it with a message rather than open it badly. The tools that read a page as a picture, such as PDF to JPG and PDF to text, are built on pdf.js, which does open a file whose only protection is owner restrictions, because such a file has no open password to supply.
Edit text in place A PDF stores glyphs at positions, not paragraphs. Re-flowing text needs the original document that made the PDF.
Turn a scan into searchable text (OCR) No OCR engine is loaded. One exists for browsers (tesseract.js), but the engine and its English data are a large download and each further language adds another, which is too heavy to load for every visitor.
Convert to Word faithfully Same reason as editing text. A PDF has no notion of headings, tables or styles to convert.
Shrink a text-only PDF by much A PDF made from Word is already mostly compressed text. There is little waste to remove.
Keep text selectable after compression Browser compression draws each page as an image. That is what makes a scan smaller, and it is also why the text stops being selectable.
Fill in a form or sign a page Both need an editor that shows the page and lets you place things on it, which is a different kind of tool. Flattening a form that is already filled, and adding a text watermark, are on this site.

The memory arithmetic that sets the size limit

There is no daily limit and no file-size limit written into the site. The real limit is the memory the browser tab is allowed to use, and it can be reasoned about with plain arithmetic.

For page-tree jobs (merge, split, rotate), the file is held once as raw bytes, once more as the library's parsed objects, and the output is built alongside. Peak memory is roughly three to four times the file size. A 100 MB merge therefore needs 300 MB to 400 MB, which a laptop tab has and a phone tab often does not. That is where the "about 100 MB on a computer, 50 MB on a phone" guidance on each tool page comes from.

For drawing jobs, the canvas is what costs memory, and only one page is drawn at a time:

Page and setting Canvas size in pixels Uncompressed memory for that one page
A4 at 300 dpi 2,480 x 3,508 34.8 MB
A4, PDF to JPG at "Print" (216 dpi) 1,785 x 2,525 18.0 MB
A4, PDF to JPG at "Screen" (108 dpi) 892 x 1,262 4.5 MB
A4, compress at "High" 1,190 x 1,683 8.0 MB
A4, compress at "Screen" 595 x 841 2.0 MB

The figures are width times height times 4 bytes per pixel. Each canvas is released before the next page is drawn, so a 500-page document needs no more canvas memory than a 5-page one. It only takes longer.

What this means when you pick a tool

  • If the job is merge, split, extract, delete or rotate, a browser does it as well as any desktop program, and the pages come out identical.
  • If the job is making a scanned PDF smaller, a browser does it well, at the cost of selectable text.
  • If the job is making a Word-made PDF smaller, expect a small gain from any tool, anywhere. The file was never inflated.
  • If the job needs OCR, text editing, or a password removed, use a desktop program, or a tool that says plainly that it does the work on a server. A browser tool that claims otherwise is doing exactly that without saying so.

Sources

  1. pdf.js, Mozilla's PDF renderer, source and licence
  2. pdf-lib, PDF creation and modification in JavaScript, source and licence
  3. PDF 1.7 specification (ISO 32000-1), free copy from Adobe