AnyConvert
← All docs

Edit PDF

Send a PDF and a list of edit operations (text, shapes, highlights, notes) applied in order; get back the edited PDF.

See the Edit PDF tool page, or the docs index for authentication, the shared request/webhook contract, and the generic error table.

Request

POST /webhooks/trigger, same endpoint and fields as every tool, with tool="edit-pdf" set explicitly (it's not the default).

curl
curl -X POST https://api.anyconvert.app/webhooks/trigger \
  -H "x-api-key: your_api_key_here" \
  -F "file=@invoice.pdf" \
  -F "fileId=document-001" \
  -F "referenceId=reference-001" \
  -F "tool=edit-pdf"

Options

An optional options multipart field carrying a JSON object, validated synchronously before a credit is charged; a bad value is rejected with 400, not charged and not queued. Coordinates are in displayed points, top-left origin; every rectangle must lie inside the displayed page.

opsarray, required1 to 1000 operations, applied in order (later operations draw on top). See the operation types below.
flattenboolean, optionalDefault false. true bakes annotations into the page content so they can't be removed or edited afterward.
fontFallbackstring, optional"auto" (default) or "fail" when a requested character has no matching glyph.
ops[].type: "text"objectx, y, width, height, text (max 20,000 chars), font, size (4-500), color, bold, italic, align, opacity, overflow (fail or shrink), minSize.
ops[].type: "rect" / "ellipse"objectx, y, width, height, stroke, strokeWidth, fill, opacity, dash.
ops[].type: "line"objectx1, y1, x2, y2, stroke, strokeWidth, opacity, dash.
ops[].type: "highlight" / "underline" / "strikeout" / "squiggly"objectReal PDF annotations: rects (1-200), color, opacity.
ops[].type: "freetext"objectx, y, width, height, text, size, color, fill, border.
ops[].type: "note"objectSticky-note annotation: x, y, text (max 2,000), author (max 100).

Pricing

Billed per page, not per document: 1 credit for every 20 pages, rounded up (a 45-page PDF costs 3 credits).

Failure reasons

Delivered via the webhook as outcome=failure with a reason below; see the docs index for the full delivery shape.

invalid_optionsA bad option/value, a rectangle out of range, text that doesn't fit with overflow: "fail", or missing glyphs with fontFallback: "fail".
encrypted_fileThe PDF is password protected.
invalid_fileThe file could not be read, or was not the format this tool expects.
render_failedSomething failed during conversion that wasn’t a problem with the input itself.
timeoutThe job did not finish within its time budget.
internal_errorAn unexpected error on our side.
AnyConvert
A simple conversion API for teams that need documents turned into the right format, automatically.
Tools
PDF to WordMerge PDFJPG to PDFSign PDFEdit PDFCompress PDFExtract Text with CoordinatesView all tools →
Product
DocsPricing
Legal
Terms of ServicePrivacy PolicyRefund Policy
Support
support@anyconvert.app
© 2026 AnyConvert. All rights reserved.