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 role: pdf_template.
If your user account does not have this role, the template tools fail immediately with an access denied error. Contact an administrator to request the role, or see Access control for more information on how roles are 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
Parameters are shown with their type and a short description. UUIDs are always strings.
PDF templates
| Tool | Description | Parameters |
|---|---|---|
|
List PDF templates. |
|
|
Return a PDF template by its ID. |
|
|
Create or update the general settings of a PDF template: description, package,
connector, access, 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 | Parameters |
|---|---|---|
|
Generate a PDF document from an activated template and bind the data that you
pass into it. To store the document so you can retrieve it later with |
|
|
List stored PDF documents that were generated within a date range. You can filter
by template name. The response contains |
|
|
Return a stored PDF document by template and |
|
Related topics
-
Tools overview — the full list of artifact types and required roles.
-
Access control — how role and development package checks are enforced on every tool call.