Edit text in a PDF

PDF text is not a document. It is a set of instructions to draw glyphs at fixed positions, with no paragraphs holding them together. That is why edits shift the layout, why fonts go missing, and why the result often looks worse than the original. Here is what actually happens, and what to do instead.

Why PDF text edits go wrong

Open a page and you find drawing commands: set this font at this size, put these glyphs at this position, move here, draw more. There is no sentence, no paragraph and no line wrapping. The line breaks you see were decided by whatever produced the file.

Change one word and nothing after it moves, because nothing was ever told how to flow. An editor has to guess where the line ends, guess the spacing rule, and rebuild the block. Sometimes it guesses right.

Embedded fonts and subsets

A PDF usually carries the fonts it needs, and it carries only the glyphs the document actually used. That is called subsetting and it saves a lot of space. It also means the letters you want to type may not be in the file.

Type a character the subset does not contain and the editor has to substitute a different font. The replacement rarely matches in weight or width, which is the usual reason an edited line looks slightly wrong without anyone being able to say why.

What a text editor actually does

The good ones group nearby glyphs into blocks, work out the font and spacing, let you retype the block, then redraw it. LibreOffice Draw opens a PDF this way, and Inkscape does it one page at a time. Both are free.

Expect the block to move. Expect the font to change if the subset is short. On a simple document produced from a word processor this works well enough. On a typeset report with columns and tables it usually does not.

The reflow problem

Making a sentence longer is the hard case. The words have nowhere to go, so the editor either lets them run past the margin or squeezes the spacing. Making it shorter leaves a gap that nothing closes.

This is why fixing a typo works and rewriting a paragraph does not. Small edits, a date, a name, a number, are what PDF text editing is genuinely for. Anything longer belongs in the source document.

If the page is a scan

Try to select a word. If your cursor sweeps across the page and highlights nothing, there is no text there. The page is a picture and every letter is pixels, so no text editor has anything to work with.

Recognition software reads the image and writes characters over it. Quality varies with the scan: clean printed text at a decent resolution comes out well, faint fax output and handwriting do not. Check every number by eye afterwards.

What works better than editing

Cover it, or destroy it. The stamp tool writes selectable text onto a page, so a correction, a label or a version marker can go on top. It leaves the original page content intact underneath.

Redaction removes content for real by rebuilding the affected page from a fresh render, so the marked text is not in the output at all. Use that when the old wording must not survive, not a black rectangle in a viewer.

Going back to the source

If you or a colleague produced the PDF, the original file is the answer. Editing the Word, Pages or LaTeX source and exporting again takes minutes and gives a clean result, which no amount of glyph surgery will.

When the source is gone and the change is small, retype the block in a free editor and check the line against the printed original. The editing overview covers which jobs avoid this problem entirely, and the form guide covers fields, which are a different mechanism.

Questions people ask

Is there a free PDF text editor?
LibreOffice Draw and Inkscape both open a PDF page and let you retype a block of text. Both are free. Expect the block to move and the font to change if the file carries only a subset of it.
Why does my text move when I edit a PDF?
Because nothing in the file describes a paragraph. Glyphs sit at fixed positions, so an editor has to guess where lines break and rebuild the block. Longer text has nowhere to flow.
Why do the letters change font after an edit?
PDFs embed only the glyphs the document used. Type a character that is not in that subset and the editor substitutes another font, which rarely matches the original weight or width.
Can I edit text in a scanned PDF?
Not directly. A scan holds no characters, only pixels. Recognition software has to read the image and write a text layer first, and its accuracy depends on how clean the scan is.

Where to go next