limits · design

What the editor leaves alone

Covered text, tables, Type 3 fonts, form XObjects, phantom spaces and the lines you did not touch: the deliberate limits of editing a PDF in place.

Knowing what an editor will not touch matters as much as knowing what it can. Edit My PDF reads a page carefully, and part of reading carefully is deciding what to leave alone. This post lists those decisions, with the reason for each.

Text the page painted over

A PDF can draw text and then paint a filled box or an image over it. Readers never see that text, but it is still in the file. An earlier version of Edit My PDF exported edits as pictures over a white backdrop, so a file that had been edited and re-opened carried its original words under each patch.

The page reader now tracks every opaque fill and image with the order it was painted in. A text run that lies wholly under opaque paint applied after it is not offered for editing. What you can click is what you can see.

Tables

Rules, the thin filled rectangles that make up table borders, are collected from the operator list, merged where they touch, and joined into table boxes. A table is an element of its own: you can move it or resize it as a block. The text inside its cells stays reachable as text, so a figure in a cell can still be clicked and retyped, and the shapes that happen to sit inside a table are not reported twice.

Fonts without outlines to embed

Three kinds of text open in a fallback face rather than the page's own:

  • text set in a Type 3 font, whose glyphs are small drawing programs rather than outlines;
  • text set in a font the PDF did not embed, which pdf.js renders with a matching system font;
  • a character you type that the embedded subset has no glyph for.

In all three cases the editor still fits the line to its printed width, so it opens looking right. On download, such an edit is painted as an image rather than written as text, because there is no face to write it in. Everything else on the page is unaffected.

Text inside form XObjects

A form XObject is a reusable block of drawing that a page invokes with Do. Letterheads, stamps and some page templates live there. Edit My PDF's export removes the original strings under an edit from the page's own content stream, but it does not descend into forms. When a form's bounding box meets an edited element, that edit is marked uncertain and a backdrop is kept under it, so the result looks right even though the covered text is still in the file.

Spaces the page never drew

Some text reaches pdf.js with spaces that are not on the page. Tracked small caps arrive as a space after nearly every letter. Two-byte space codes in Identity-H fonts have word spacing added by the text extractor that the renderer never applied. The glyph stream read from the operator list knows what was really drawn, so the fake spaces are removed and the drifted positions pulled back. The text you edit is the text the page shows.

List markers and hyphens

A bullet is usually drawn in a smaller font, and its box sorts after the first line of its item. The reader recognises a marker beside a line and keeps the two together. A line that ends with a hyphen is treated as a hard break, since breaking it elsewhere would split the word; it stays a hyphenated line until you edit it.

Lines you did not touch

The most important thing the editor leaves alone is the rest of the paragraph. A block opens with every line break the page made, every line's own baseline and indent, and every line's own word gap. The first edit lets the text flow again from that point onward; the lines above it keep their printed layout. Nothing is re-justified, re-kerned or re-wrapped because you clicked.

What you cannot do, by design

  • Edit a scanned page's text. There is no OCR; you can annotate on top.
  • Open a password-protected file.
  • Merge, split, compress, convert or fill forms. Edit My PDF opens one PDF and writes one PDF.

For those jobs the comparison pages are honest about which tool to use instead.