Guide
Why is a PDF so hard to edit?
A PDF is not a document in the way a Word file is. It is a set of drawing instructions: put this letter at this spot on the page, in this font, then stop. The words, lines and paragraphs you see are never stored, so an editor has to work them out before it can change anything. Here is what is inside a PDF, why one file gives way and the next refuses, and how editing works anyway.
Updated
Edit existing text in a PDF
Free to edit in your browser. Downloading needs a free account and starts at 99p for your first week.
A PDF is a finished page, not a document
Adobe designed the format in the early 1990s to solve one problem: a page should look exactly the same on every screen and every printer, whatever fonts and software the other person has. It grew out of PostScript, the language printers already spoke, and it kept that nature. A PDF describes what a page looks like once everything has been decided: the typeface, the size, where each line breaks, where every letter sits.
A Word document or a Google Doc stores the opposite: the text, and the rules for laying it out (this is a heading, this paragraph is justified, the margins are 2 cm). The app lays the page out fresh every time you open it, which is why you can type in the middle of a sentence and everything after it moves out of the way. A PDF has already done that work and thrown the rules away. Editing one means reversing a process the file no longer remembers.
What is actually inside a PDF page
Look inside a PDF page and you will not find sentences. You find a list of drawing commands. For text, each one says roughly: use font F1 at 11 points, move to this position, draw these characters. The things you would need in order to edit are mostly missing:
- No words or paragraphs. The file places characters, often in short bursts. A space is frequently just a gap in the positioning rather than a space character, and a paragraph is simply a set of lines that happen to sit under one another.
- No reading order. Text can be drawn in any sequence the producing program found convenient: a table column by column, the page footer first, two newspaper columns interleaved line by line.
- Fonts cut down to the letters used. To keep the file small, most PDFs embed a subset of each font holding only the characters that appear on the page. If the word you need contains a letter that was never used, the font in the file has no shape for it. Some PDFs embed no font at all and rely on whatever the reader can find.
- Fixed spacing. Justified text is stored with precise adjustments along the line so that it fills its measure. Change one word and every one of those numbers is wrong.
- Separate layers for things added later. Highlights, sticky notes, white boxes, form fields and signatures are annotations drawn on top of the page, not part of it. That is why a white box hides text without removing it.
- Pictures that look like text. A logo, a chart, a pasted screenshot or a scanned page is pixels. There are no characters in it to edit at all.
Everything else about a PDF reinforces this. Its content is compressed, its objects are found by their byte position in the file, and a password-protected file is encrypted. None of that is designed to be opened up and rearranged. It is designed to be displayed.
Why changing a single word is hard
Say you want to fix one spelling mistake in the middle of a paragraph. In a Word file that is a keystroke. In a PDF, an editor first has to find out which drawn characters belong to the same line (by measuring their positions), which lines form a paragraph (by their spacing, their indents and whether a line stops short of the margin), how wide the column is, and whether the text is left-aligned, centred or justified. None of that is written down anywhere.
Then it has to put the old characters out of sight, work out which font drew them and what colour the ink was, and draw the corrected word in the same typeface, size and spacing so that it does not stand out. If the correction is longer than the original, the line no longer fits, so the whole paragraph has to be re-wrapped, and anything below it has to move down. But only if there is nothing in the way: a table, a picture or a footer is a wall.
Each of those steps is guesswork to some degree, and every program that produces PDFs makes different choices about fonts, spacing and drawing order. That is the real answer to why PDFs are so hard to edit. It is not one lock. It is a dozen small facts the file never recorded, which every editor has to infer and sometimes gets wrong.
| What you change | In a Word document | In a PDF |
|---|---|---|
| A typo in a paragraph | Retype the letters; the paragraph re-wraps itself | Find the line, hide the old characters, redraw the word in the embedded font, re-wrap the paragraph |
| A longer sentence | Everything below moves down | The lines below must be moved, unless a table, rule or image blocks them |
| The font or its size | One style change for the whole document | Line by line, re-fitting each one; the file may have no shapes for a different font |
| A word in a scanned letter | Not possible without OCR | The same: the page is a picture until OCR reads it |
| Text inside a logo or chart | Edit the image in its own program | The same: the picture has to be replaced |
Why one PDF edits easily and the next refuses
Because the format allows so much variation, how editable a PDF is depends on how it was made far more than on which app you open it in:
- Exported from Word, Google Docs, InDesign or a web page: real text, embedded fonts, one drawn line per visible line. This is the best case. Most editors can change a word, and the good ones can reflow the paragraph.
- Made with a font that was not embedded: the text edits, but new letters arrive in a substitute typeface and the join can show.
- Scanned or photographed: a picture with no text in it. Nothing selects until OCR makes the scan editable, and even then the recognised text is the engine's best reading of the pixels.
- Flattened or signed: form fields and annotations have been merged into the page, and a digital signature seals the file, so the first edit breaks it.
- Password-protected: the contents are encrypted, and no editor sees the page without the password.
If your problem is one particular file rather than the format in general, our page on why you cannot edit a PDF gives a ten-second test for each of these and the fix that goes with it.
How a good PDF editor edits text anyway
Nothing about the format stops an editor from changing text. It just has to rebuild what the file left out, and do it well enough that the result looks untouched. This is where editors differ most. Some convert the whole page to a word processor document and back, which loses the layout. Some turn the edited page into a picture, which loses the selectable text. Some draw the new word in whatever font is handy and leave the old one underneath.
peadf's PDF text editor was built around doing this properly, in your browser, without uploading the file. It gathers the drawn characters into lines by their positions, works out which lines form a paragraph and how wide its column is, reads the colour of the ink from the drawing commands themselves, and reads the font out of the file so that an edited line is set in the same typeface as the lines around it. The old characters are taken out of the file where that can be done safely and checked; otherwise they are hidden under a patch painted from the page's own background. A longer edit re-wraps only the lines it has to and pushes the text below it down, but only over plain background. And where the embedded font never held a character you type, that one character is drawn separately so that the rest of the line stays real text.
How to edit a PDF with the least damage
Knowing why the format resists tells you how to work with it. Whatever editor you use:
- 1
Check what kind of PDF you have
Drag across a line of text. If it highlights, the page has real text. If a box appears over the whole page instead, it is a scan and needs OCR first.
- 2
Edit the existing line rather than covering it
In peadf, open the file in the PDF text editor, pick Select and click the line. Retype the words in place, so the editor can keep the font, size, colour and alignment it found.
- 3
Keep edits close to the original length
A correction of similar length stays on its line. A much longer one re-wraps the paragraph, and the editor tells you if there is no room to push the text below it.
- 4
Compare the new characters with their neighbours
Zoom in. If a letter looks like a different typeface, the file did not carry that shape. Rewording to avoid it, or covering and re-setting the whole line, keeps the page consistent. Our page on editing a PDF without losing the formatting has more on this.
- 5
Check the exported file, not the editor
Open the download in your usual reader. Search for the corrected word, and for the old one. Editing is free. Downloading needs a free account and starts at 99p for your first week.
Where even the best editor stops
- Text inside a picture. Letters in a logo, a chart or a screenshot are pixels, so the picture has to be replaced, not edited.
- Centred and right-aligned text, table cells and lines on their own edit one line at a time, holding their own edge, because there is no paragraph to reflow.
- A paragraph that cannot push what is below it is fitted into the space it has, down to a point. Past that, the honest fix is shorter text.
- Fonts that were never embedded, and characters the embedded subset does not contain, come out in a substitute. A short edit hides this well; a whole new paragraph does not.
- OCR text is an estimate. Its positions and sizes are approximate, and the recognised words need proofreading.
- A digital signature does not survive an edit, in any editor. Get an unsigned copy, change that, and sign again.
- Encryption is not a technicality. Without the password there is no page to edit, and nothing here recovers or guesses one.
Questions people ask
Why was PDF designed to be so hard to edit?
It was not designed to be hard to edit. It was designed to be impossible to display wrongly. In the early 1990s a document looked different on every machine, and fixing every letter in place solved that, which is still why a PDF is the format for contracts, invoices and forms. Editability was never the goal, so the format never stored what editing needs.
Why does the text turn into gibberish when I copy it out of a PDF?
The file maps its characters to glyph shapes in its own private way and never says which real letters they stand for. Readers draw the shapes correctly, but copying has nothing to translate them with, and any editor that reads the text has the same problem. The practical fix is the original document, if anyone still has it.
Is it easier to convert the PDF to Word and edit it there?
For a short, simple document, often yes: the converter guesses the structure, you edit a normal document, and you export a new PDF. For anything with columns, tables, exact spacing or a particular typeface, that guessed structure is the problem, and the new PDF is a different document that reads the same. If the page has to look like the original with one change, edit the PDF itself.
Why does the font change when I edit a PDF?
Either the font was never embedded in the file, so the editor has nothing to draw with but a substitute, or it was embedded as a subset that never contained the letter you typed. Editors that ignore the embedded font altogether change the typeface on every edit. The fix is an editor that reads the font out of the file, and edits that stay within the letters it has.
Why can't I edit a PDF in my browser or my email's preview?
Those viewers are built to show a file quickly and safely, not to change it. Most will fill in form fields and some will add a note, and that is the whole list. The file is usually fine. The app is the limit.
Does a PDF have a text layer I can switch on?
A typed PDF has its text in the page already, drawn as glyphs. A scanned PDF has none, and there is no switch: the text has to be recognised. Running OCR gives the editor a reading of each line to work from, and an edited line goes out searchable.
Tools for this job
Edit existing text in a PDF
Retype text; fonts and layout are kept.
Edit a scanned PDF
OCR the scan, then edit it like text.
Replace an image in a PDF
Swap or remove pictures on the page.