Add content to a PDF session
add_pdf_contentAppend text at specified coordinates or insert a blank page into an active PDF session. Build multi-page documents by calling this repeatedly, then save with save_pdf.
Instructions
Append text or a new page to an open create_pdf session (step 2 of 3).
Mutates the in-memory session; nothing is written to disk until save_pdf. Returns JSON {status, session_id, page_count} on success, or {error, code} if the session is missing/inactive or required text fields are absent. Coordinates use PDF points with the origin at the bottom-left of the page.
Call repeatedly to build up pages, then call save_pdf. This only works on a session from create_pdf — to add notes/highlights to an existing PDF file use annotate_pdf instead.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| x | No | Horizontal position in PDF points from the left edge. Required when content_type='text'. | |
| y | No | Vertical position in PDF points from the bottom edge (origin is bottom-left). Required when content_type='text'. | |
| font | No | Font name (e.g. 'Helvetica', 'Courier', 'Times-Roman'). Defaults to Helvetica when omitted. | |
| content | No | Text to draw. Required when content_type='text'. | |
| font_size | No | Font size in points for text content. | |
| session_id | Yes | Session id returned by create_pdf. Must be active. | |
| content_type | Yes | 'text' draws a text string at (x, y) on the current page; 'new_page' appends a blank page and makes it current. |
Output Schema
| Name | Required | Description | Default |
|---|---|---|---|
| result | Yes |