Skip to main content
All posts
edit PDF API automation

How to Edit a PDF You Already Have

Rotate and remove pages, add text and watermarks, number a bundle, and strip metadata and JavaScript — page by page in the dashboard, or as one API call.

PodPDF Team September 16, 2026 6 min read

Most PDF work is not about making a document. It is about the one you already have. The scan came in sideways. The bundle needs numbering before it goes to the other side. Somebody wants the draft watermarked. The file has the author’s name buried in it and it is about to leave the building.

None of that is hard. It is just fiddly, and it is the kind of fiddly that is easy to get subtly wrong.

PodPDF’s editor works on one document at a time, page by page. You make your changes, you see them on the page, and nothing is written until you save.

Changes Are a List, Not a Sequence of Saves

The thing that makes most PDF editors tiring is that every change is a round trip. Rotate a page, save. Add a stamp, save again. Each save rewrites the file.

Here, your changes accumulate as a list. Rotate page 4, watermark everything, number the bundle, clear the metadata — that is four changes sitting in a panel, none of them applied yet. You can reorder them, remove one, or check what they would do. Then you save once.

One save, one operation, however many changes it carries.

Seeing It Before You Commit

Before anything is written, PodPDF tells you what would happen:

  • How many pages you will end up with
  • Which pages each change touches
  • Anything that cannot be applied, and why
  • Whether the document is digitally signed, because saving will invalidate that signature

That last one matters more than it sounds. Every PDF tool that changes a file rewrites it, and a rewrite breaks a digital signature. Most tools let you find out afterwards.

Checking is free. Saving is the only thing that counts as an operation.

What You Can Change

Pages. Rotate in 90° steps, delete, reorder, insert blanks, or keep only the pages you name.

Text and marks. Drop a line — or a block — of text anywhere on a page. Watermarks at any angle and opacity. Headers and footers with {page}, {pages} and {date} filled in. Bates numbering with your own prefix.

The document itself. Set or clear the title, author and keywords. Strip out JavaScript, embedded files and automatic actions.

The Corner the Reader Sees

A small thing that is easy to get wrong: a scanned page is often stored sideways, with a flag telling the viewer to turn it.

Ask for a stamp in the bottom-right of such a page and the naive answer puts it in the bottom-right of the stored page — which the reader sees rotated, in the wrong corner, lying on its side.

PodPDF places marks in the corner as the reader sees it, the right way up, whatever rotation the page carries. A bundle of mixed-orientation scans comes out numbered consistently.

Removing Metadata Actually Removes It

Clearing a document’s properties is not the same as removing them.

A PDF holds its title and author in two places: the document information dictionary, and an XMP block. Clear only the first and the old title is still sitting in the file for anyone who opens it in a text editor. And unlinking an object does not delete it — the bytes stay unless they are swept out.

metadata.strip clears both and sweeps the file. The same goes for sanitize: the JavaScript is gone from the bytes, not merely unreferenced. It reports what it removed, so you have an answer when someone asks.

In the API

Describe the changes as a recipe and send it:

curl -X POST https://api.podpdf.com/pdf/edit \
  -H "X-API-Key: $PODPDF_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{
        "source_key": "pdf-uploads/…",
        "recipe": [
          { "op": "pages.rotate", "pages": ["p3"], "degrees": 90 },
          { "op": "text.add", "pages": ["p0"], "text": "Received 16 September 2026" },
          { "op": "bates.stamp", "prefix": "ACME-", "start": 1, "digits": 6 },
          { "op": "metadata.strip" }
        ]
      }'

POST /pdf/edit/preflight takes the same body and tells you what it would do without doing it. It is free, so there is no reason not to call it first.

Naming Pages That Might Move

Operations run in order, which means page numbers shift underneath you. Delete page 2 and the old page 8 is now page 7.

So you can name pages by id instead: p0, p1, p2, taken from the document as you opened it. An id always refers to the same physical page, whatever the changes before it did. /pdf/inspect gives you the list.

{ "op": "pages.rotate", "pages": "2,5-7",          "degrees": 90 }  // page numbers, resolved live
{ "op": "pages.rotate", "pages": ["p1","p4","p6"], "degrees": 90 }  // ids, immune to earlier changes

Saving Twice by Accident

If a save request times out on your end, you do not know whether it happened. Retrying might charge you twice.

Send a commit_token — any string you generate — and reuse it on the retry. The first request does the work; repeats get the same result back and are not charged again.

Limits

Pages in one document200
Document size150 MB
Changes in one save200
Downloads kept7 days

200 pages covers a scanned bundle comfortably — 150 MB is roughly 200 pages of scanned paper. A longer document is refused when you open it, not after you have done the work: split it with merge and split and edit the parts.

What It Does Not Do

Worth saying plainly:

  • No redaction. Drawing a black box over text leaves the text underneath, extractable by anyone who selects it. Doing it properly means rewriting the page’s content, and we would rather ship nothing than ship something that looks like redaction and is not.
  • No form filling yet. Existing form fields survive editing, but you cannot fill them here.
  • No Chinese, Japanese, Korean, Arabic or Hebrew in stamps and watermarks. Latin, Greek, Cyrillic and Vietnamese all work — if your text needs more than the built-in fonts cover, a Unicode face is used automatically. Scripts that are not supported are refused with a message naming the character, rather than drawn as empty boxes.
  • No password-protected files. Unlock the file first with Unlock PDF, and protect the edited copy again if it needs it.

Try It

The editor is in the dashboard under Edit PDF, and in the API at POST /pdf/edit. Opening a document and checking your changes are both free — you only pay when you save.

edit PDF API automation
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.