pdf_edit
Apply atomic batch edits to an open PDF: fill AcroForm fields or stamp text overlays, and optionally render pages as PNGs to verify placement.
Instructions
Apply a batch of edits to an open PDF document session. Ops: {op:'set_field', name, value} fills an AcroForm field (checkbox/radio/choice values must match the field's options); {op:'add_text', page, x, y, text, font_size?} stamps a text overlay onto a flat PDF at PDF user-space coordinates (origin bottom-left, points). The batch is atomic: any invalid op rejects the whole batch and the document is unchanged. Pass render_pages (1-based) to get PNG renders back for verifying placement. Rejected once a signature has been requested or the document is signed.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| ops | Yes | ||
| doc_id | Yes | ||
| user_id | No | ||
| render_pages | No | ||
| acknowledge_signature_invalidation | No |
Output Schema
| Name | Required | Description | Default |
|---|---|---|---|
| doc_id | Yes | ||
| fields | No | Field inventory after the edit | |
| status | Yes | ||
| applied_ops | Yes | ||
| page_images | No |