PDF templates and documents
PDF tools manage the templates of the PDF Designer and work with the PDF documents generated from them.
The tools do not change the design of a template, that is, its document tree.
save_pdf_template only changes the general settings of a template. Design the
template itself in the PDF Designer.
A document is always generated from the activated version of a template. After
you change a template, call activate_pdf_template to make the saved version
available for generation. A new template is created with the status Inactive,
so it cannot be used for generation until you activate it.
Required access: the PDF Designer tool (pdfdesigner) in one of your roles.
Display access is enough to list templates and stored documents. Reading a template
with get_pdf_template, saving, activating, and deleting require Edit access.
If none of your roles includes this tool with the required access, the template tools fail immediately with an access denied error. Contact an administrator to request access, or see Access control for more information on how access is enforced.
To change, activate, or delete a template that belongs to a development package with roles, you need a role with edit access to that package. Administrators can always edit. You cannot assign a template to a template package. To move a template to another package, you also need access to the target package.
list_pdf_templates only returns templates from development packages that you
can access.
generate_pdf_document and get_pdf_document check the runtime access to the
PDF template instead, as set in the access and roles of the template. You can generate
or read a document only if you have runtime access to its template.
Available tools
PDF templates
| Tool | Description |
|---|---|
|
List PDF templates. Supports filtering, field selection, and sorting through |
|
Return a PDF template by its ID. |
|
Create or update the general settings of a PDF template: name, description, package,
connector, public access, storage of generated documents, disabled state, and roles.
Omit A new template gets an empty design with the Settings, Content, and Styles
document components, an empty interface, and the status |
|
Activate a PDF template, which makes its saved design available for generation. The activation fails if another user holds the edit lock of the template. |
|
Delete a PDF template by its ID, including its activated version and all stored documents generated from it. |
| Deleting a template also deletes every stored PDF document that was generated from it. The documents cannot be retrieved afterwards. |
PDF documents
| Tool | Description |
|---|---|
|
Generate a PDF document from an activated template and bind the data that you
pass into the template interface. To store the document so that you can retrieve
it later with |
|
List stored PDF documents generated within a date range, optionally filtered by
template name. Results are paginated. The response contains |
|
Return a stored PDF document by template name or ID and |
Related topics
-
Tools overview — the full list of artifact types and required access.
-
Access control — how role and development package checks are enforced on every tool call.