Add content to a PDF session
add_pdf_contentAdd textual content or new pages to an active PDF session created by create_pdf, enabling multi-page document assembly before saving.
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 |
|---|---|---|---|
| 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. | |
| content | No | Text to draw. Required when content_type='text'. | |
| 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. | |
| font_size | No | Font size in points for text content. |
Output Schema
| Name | Required | Description | Default |
|---|---|---|---|
| result | Yes |