create_pdf
Render a structured document spec into a PDF file with customizable themes, output paths, and image handling. Returns the generated file and its metadata.
Instructions
Render a document spec to a PDF and return metadata plus the inline file.
Args:
spec: The document spec (schema v1); see the pdfcreator://schema resource.
out: Output PDF path. Defaults to <output_dir>/<slug>.pdf.
home: Data root. Defaults to $PDF_CREATOR_HOME or ~/.local/share/pdf-creator.
theme: Override the spec theme (e.g. default, report, invoice).
base_dir: Base for relative image/font paths. Defaults to the server cwd.
allow_remote: Allow fetching remote images referenced by the spec.
force: Overwrite an existing output file.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| out | No | ||
| home | No | ||
| spec | Yes | ||
| force | No | ||
| theme | No | ||
| base_dir | No | ||
| allow_remote | No |