Rasp

File format

PDF

A description of how a page should look, not a document you can edit. Almost everything surprising about PDFs follows from that.

What is a PDF file?

A PDF is a description of how a page should be drawn — where each character, line and image sits — rather than a document made of editable text. That is why it looks identical everywhere, why editing one is awkward, and why a scanned PDF may contain no searchable text at all.

The facts

Full namePortable Document Format
File extensions.pdf
MIME typeapplication/pdf
Introduced1993
Created byAdobe, standardised as ISO 32000
CompressionA container — compression depends on what is inside
TransparencyNot supported
SpecificationPDF.js — an open source PDF implementation

A PDF describes a page, not a document

This is the one idea that explains almost everything people find surprising about PDFs.

A Word document stores a document: paragraphs, styles, a flow of text that rearranges when you change the margins. A PDF stores a page description: put this glyph at this coordinate, in this font, at this size; draw this line here; place this image there.

Adobe designed it in 1993 for a specific problem — a document that looked identical on every machine, whatever fonts or software were installed. Describing exact positions rather than intent solves that completely.

It also creates every limitation below.

Why editing is awkward

There are no paragraphs to reflow, because the PDF does not know it has paragraphs. It knows where each character was placed.

Insert a sentence and something must recompute the layout — which means reconstructing intent the file never recorded. PDF editors do this by inference, which is why the results are variable and why editing the original and re-exporting is nearly always better.

Why some PDFs have no text at all

A scanned PDF is a photograph of a page wrapped in a PDF container. The file holds an image; the letters exist only as arrangements of pixels, exactly as they would in a photograph of a book.

The two-second test: open it and try to select a word. If individual words highlight, there is a text layer, and extracting the text will work. If you can only drag a rectangle over the page, it is a scan, and no amount of extraction will find words that are not there — that needs optical character recognition.

Why PDFs get large

Embedded images, almost always. A PDF assembled from ten phone photographs is roughly the size of those ten photographs, because the images are stored inside it.

Embedded fonts add a smaller, fixed cost — and explain something counterintuitive: splitting a PDF into single pages often produces files that total more than the original, because each page now needs its own copy of the fonts it uses.

What this site can and cannot do with PDFs

Honestly stated, because the gap matters:

Canmerge, split, extract pages, delete pages, rotate, compress, convert pages to images, extract text, and build a PDF from images.

Cannot — recompress a PDF’s images while keeping its text selectable, edit text, fill forms, sign, or run OCR on a scan. Compressing works by rasterising, which is ideal for scans and lossy for text documents. How to make a PDF smaller sets out what actually works with what is here.

All of the above run in your browser using pdf-lib and PDF.js. Nothing is uploaded, which matters more for PDFs than for any other format on this site — they are the files most likely to contain a signature, a bank balance or a medical result.

Questions

What does PDF stand for?
Portable Document Format. Adobe created it in 1993 to solve a specific problem: a document that looked identical on every machine, regardless of which fonts or software were installed. It became an open ISO standard in 2008.
Why can't I edit a PDF easily?
Because it does not store a document in the way a word processor does. It stores instructions for drawing a page — this character at this position in this font. There are no paragraphs to reflow, so inserting a sentence means recomputing the layout the original program produced, which the PDF no longer describes.
Why can't I select the text in my PDF?
Almost certainly because it is a scan. A scanned PDF contains a photograph of a page; the letters exist only as pixels. Getting text out requires optical character recognition, which is a different operation from reading a text layer.
How do I know whether my PDF has real text?
Try to select a word with your cursor. If individual words highlight, there is a text layer. If you can only drag a rectangle over the page as though it were an image, it is a scan.
Why is my PDF so large?
Usually embedded images, especially from a scanner or phone camera. A PDF built from ten photographs is roughly the size of those ten photographs. Embedded fonts add a smaller fixed cost.
Are PDFs safe to open?
The format supports embedded JavaScript and external actions, which have historically been used as attack vectors. Modern readers sandbox this heavily, and browser-based readers more so. Treat PDFs from unknown senders with the same caution as any attachment.
What is the difference between a PDF and a scan?
A scan is a kind of PDF — one whose pages are images rather than text. Both are PDFs; only one contains anything a computer can read as words.
Can a PDF be compressed?
Yes. Nearly all of a PDF's size is embedded images, so that is where the saving is. This site compresses by re-rendering each page and rebuilding the document, which is ideal for scans; for a document with real text it turns that text into an image, and the tool warns you before it does.

Sources