pdf_export
Export extracted PDF data as JSON or CSV, inline or to a file, for a single page or a document range. Filter object types to trim the payload.
Instructions
Export extracted PDF data as JSON or CSV, either inline or to a file.
This is the tool for anything bigger than a single page: JSON keeps the same
shapes as the extract tools (metadata, page count, object types, pages) and CSV
lays out one # <type> section per type. Choose scope='page' with
page for one page, or scope='document' with optional
first_page/last_page. object_types trims the payload and
output_path writes the file to disk; otherwise the content comes back
inline unless it exceeds the inline limit, in which case it is written to a
file in the OS temp directory and that path is returned instead.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| page | No | 1-based page number; only used when scope='page' (required there). Ignored when scope='document' - use first_page/last_page to bound a range. | |
| path | Yes | Path to the PDF: absolute, or relative to the server process working directory. Any readable regular file is accepted; the .pdf suffix is not required. | |
| scope | No | 'document' (default) exports a page range; 'page' exports the single 'page'. | document |
| format | No | Output format: 'json' (default) or 'csv'. | json |
| password | No | Password for an encrypted PDF. Omit or pass null for unprotected documents. | |
| last_page | No | Last page of a document-scope export (1-based, inclusive). Defaults to the last page. | |
| first_page | No | First page of a document-scope export (1-based, inclusive). Defaults to page 1. | |
| output_path | No | File to write the export to. The parent directory must already exist. Omit to receive the content inline (large results are written to the temp directory instead). | |
| object_types | No | Object types to include: any of char, word, rect, line, curve, image, table. Omit for all types; unknown names are ignored and the output uses the canonical order. |