Annotate a PDF
annotate_pdfAdd sticky notes or highlight text on any PDF page. Specify page index, coordinates, and annotation type to mark up documents.
Instructions
Stamp a sticky note or highlight onto a page of an existing PDF.
Writes the annotated copy to output_path (overwriting any existing file) and returns JSON {status, annotation_type}; out-of-range pages or coordinates outside the page bounds return {error, code}. Coordinates are in PDF points with the origin at the bottom-left.
Use this to mark up a document. To reorder/rotate/overlay whole pages use manipulate_pdf; to author a new PDF use create_pdf.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| input_path | Yes | Source PDF to annotate, relative to the workspace. | |
| output_path | Yes | Destination .pdf path; overwritten if it already exists. | |
| annotation_type | Yes | 'text' adds a sticky-note marker at (x, y); 'highlight' draws a highlight rectangle of width×height anchored at (x, y). | |
| page | Yes | 0-based index of the page to annotate. | |
| x | Yes | Horizontal anchor in PDF points from the left edge. | |
| y | Yes | Vertical anchor in PDF points from the bottom edge (origin is bottom-left). | |
| contents | No | Note text for a 'text' annotation. Ignored for 'highlight'. | |
| width | No | Highlight width in points. Used only for 'highlight'. | |
| height | No | Highlight height in points. Used only for 'highlight'. |
Output Schema
| Name | Required | Description | Default |
|---|---|---|---|
| result | Yes |