Skip to main content
All posts
edit annotations PDF API

Highlight and Annotate a PDF

Highlight text, leave sticky notes, place a signature image, and flatten the markup when it is final — in the editor or with one API call.

PodPDF Team September 17, 2026 5 min read

Marking up a document is the other half of editing it. Not changing what it says — pointing at the part that matters, leaving a question for whoever reads it next, putting a signature where one belongs.

PodPDF’s editor now does all three.

Three ways to highlight, because documents differ

Highlight text puts a selectable text layer over the page and lets you select the way you would in any reader: drag across words, double-click one, shift-click to extend. A selection that wraps across three lines becomes one highlight with three boxes, not three separate marks.

Highlight area is a dragged box. That is not a lesser option — a scanned page has no text to select at all, and scans are a large share of what gets edited. When a page has no text layer the editor says so and points you at the box.

Find and highlight, on the Whole document tab, is for the other job: every “Confidential” in a sixty-page contract, which nobody is going to select sixty times. Type the phrase, choose whether capitals and whole words matter, and every occurrence is highlighted — across the document or on just the page you are on. Each match is drawn on the page before you save, and the pending change tells you how many were found, so a phrase that is not there is caught before it costs anything.

Highlights are drawn with a multiply blend, which is the difference between a highlighter and a marker pen: the words stay readable through the colour instead of being painted over. Without that, readers render highlights however they like, and some of them paint an opaque block straight over the text.

Sticky notes

Click a point on the page and type. The note carries its text, an icon and an author, exactly as a comment left in any reader would.

The note is placed where you clicked and the text is asked for afterwards, so it lands where you meant it rather than where a dialog happened to be sitting.

Images and signatures

Placing an image asks the one question that actually matters: can it be taken off again?

  • Permanent draws the image into the page. It cannot be moved or deleted afterwards.
  • Removable adds it as an annotation, which any reader can select, drag or delete.

Permanent is the default, and deliberately. Someone placing a signature almost always means it to stay, and an annotation a recipient can drag off the page is not what they think they are getting.

A word on that: a signature image is not a digital signature. It is a picture of one. If you need a cryptographic signature, this is not that — and see the warning below about documents that already carry one.

Annotations are not part of the page

That is usually the point. An annotation can be selected, edited and deleted by whoever opens the file, because it is a comment rather than a change.

When you want the markup to be final, flatten it — the highlights and stamps are drawn into the page and the annotations go away:

[
  {
    "op": "annotate.highlight",
    "pages": ["p2"],
    "rects": [{ "x": 72, "y": 700, "width": 260, "height": 13 }]
  },
  { "op": "annotations.flatten" }
]

Flattening cannot be undone. It deliberately leaves three things alone: form fields (that is a separate, explicit step), hyperlinks, which have nothing to draw and would be silently killed, and sticky notes, because a reader draws their icon and burning one in is impossible without losing the note’s text.

Already signed documents

Saving any change rewrites the whole file, so a digital signature on the document will no longer validate afterwards. That is true of every edit, not just annotations.

The editor will not let this happen by accident: on a signed document you have to tick a box confirming you understand before the save button will work. Every other edit can be undone by editing again; this one cannot.

With the API

Say what to highlight and every place it appears is marked — no coordinates to work out:

{
  "op": "annotate.highlight",
  "text": "Confidential",
  "whole_word": true,
  "contents": "Remove before sending"
}

Leave pages out to search the whole document. Each occurrence becomes its own highlight, and a phrase that wraps onto the next line is still found. It searches the text layer, so a scanned page needs OCR first — and if nothing matches, the save is refused rather than charged for doing nothing.

When you already know where, give rectangles instead — one per line of a wrapped selection, which is what the editor sends when you select text on the page:

{
  "op": "annotate.highlight",
  "pages": ["p2"],
  "rects": [{ "x": 72, "y": 320, "width": 260, "height": 13 }],
  "contents": "Check this clause",
  "author": "Ada"
}

Coordinates are PDF user space, bottom-left origin, the same as x and y on any mark. A highlight placed by coordinates goes on exactly one page: leaving pages out means “every page” for a watermark, but the same coordinates on every page is not something anyone wants.

Limits

One document at a time, up to 200 pages and 150 MB, with up to 200 changes in a single save. Images up to 4 MB, PNG or JPEG. One save is one charge, however much markup it carries.

edit annotations PDF API
Back to blog

PodPDF is built by XAD Labs, which builds custom PDF processing pipelines at scale.

Start generating PDFs today

$0.005 per PDF on a monthly plan, or $0.01 from one-off credit packs.