Preview values in place
render_filled_previewPreview how the filled page will look before fill_pdf. Costs nothing.
`values` maps field id -> text (checkboxes tick on "yes"/"x"/"true"). Text
placement, size and wrapping come from the same code as the export, with
the same flatten/fillable flags as fill_pdf. Not simulated: a watermark or
an account limit that stops fill_pdf.
In the JSON, `fit` lists values that were shrunk or cut and `warnings`
what to fix first. `preview_url` links to the same image; some clients
(e.g. ChatGPT) do not display tool images, so there the user sees the page
only through `preview_url`. Restricted data (payment cards, PHI,
government ids, or authentication secrets) is not accepted by this public
plugin.
When to use:
- Use `render_filled_preview` to verify text placement, alignment, and font
sizing on each populated page at no cost before calling `fill_pdf` (required
for every populated page on ML-detected layouts).
- Use `render_preview` to inspect empty field bounding boxes and `field_id`
labels without values.
- Use `fill_pdf` once visual review is complete to generate the downloadable
filled PDF.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| values | Yes | Mapping of `field_id` (from `open_pdf` or `list_fields`) to the string value to render. Checkboxes tick on `'yes'`, `'x'`, or `'true'`. Do not pass restricted data (payment cards, PHI, government IDs, or authentication secrets). | |
| flatten | No | If `True` (default), bakes text statically into the page content. If `False`, preserves existing embedded AcroForm widgets as editable. Must match the `flatten` flag later passed to `fill_pdf`. | |
| fillable | No | If `True`, synthesizes interactive AcroForm widgets on flat/scanned PDFs (takes precedence over `flatten`). Must match the `fillable` flag later passed to `fill_pdf`. | |
| page_index | No | 0-based page index (`0` to `page_count - 1`) of the document to render. | |
| workspace_id | Yes | Active workspace ID returned by `open_pdf` (`summary.workspace_id`). |