> ## Documentation Index
> Fetch the complete documentation index at: https://composio-preview.mintlify.site/llms.txt
> Use this file to discover all available pages before exploring further.

# PDFgen

> PDFgen creates PDFs from reusable templates, HTML, Markdown, or natural-language prompts and manages account templates and usage logs.

![PDFgen logo](https://mintcdn.com/composio-preview/gqjBKmmJCINafaiK/images/toolkits/pdfgen.svg?fit=max\&auto=format\&n=gqjBKmmJCINafaiK\&q=85\&s=aa46331cf70dfadba1fc57ceaa96e60f)

* **Category:** documents
* **Auth:** API\_KEY
* **Composio-managed OAuth available?** N/A
* **Tools:** 8
* **Triggers:** 0
* **Slug:** `PDFGEN`
* **Version:** 00000000\_00

## Tools

> [accordion] Create Template
>
> **Slug:** `PDFGEN_CREATE_TEMPLATE`
>
> Create a reusable HTML template for later PDF generation.
>
> #### Input Parameters
>
> **name** `string` *required*
>
> Human-readable template name.
>
> **engine** `string ("handlebars" | "legacy")`
>
> Template rendering engine.
>
> **content** `string` *required*
>
> HTML template content, optionally containing Handlebars tokens.
>
> #### Output
>
> **data** `string` *required*
>
> Data from the action execution
>
> **error** `string`
>
> Error if any occurred during the execution of the action
>
> **successful** `boolean` *required*
>
> Whether or not the action execution was successful or not

> [accordion] Delete Template
>
> **Slug:** `PDFGEN_DELETE_TEMPLATE`
>
> Permanently delete one saved template owned by the connected account.
>
> #### Input Parameters
>
> **template\_id** `string` *required*
>
> ID of the template to permanently delete.
>
> #### Output
>
> **data** `string` *required*
>
> Data from the action execution
>
> **error** `string`
>
> Error if any occurred during the execution of the action
>
> **successful** `boolean` *required*
>
> Whether or not the action execution was successful or not

> [accordion] Generate PDF
>
> **Slug:** `PDFGEN_GENERATE_PDF`
>
> Generate a PDF from exactly one saved template, HTML document, Markdown document, or AI prompt and return a temporary download URL.
>
> #### Input Parameters
>
> **data** `object`
>
> Values to merge into a saved template or raw HTML. Valid only with template\_id or html.
>
> **html** `string`
>
> Raw HTML to render, optionally with Handlebars tokens. Provide exactly one PDF source field.
>
> **engine** `string ("handlebars" | "legacy")`
>
> Template engine for raw HTML only. Omit to use PDFgen's handlebars default.
>
> **format** `string ("A4" | "Letter" | "Legal" | "A3" | "A5" | "Tabloid")`
>
> PDF page size.
>
> **prompt** `string`
>
> Plain-English document description for AI-generated HTML. Provide exactly one PDF source field; prompt generation costs twice the normal page rate.
>
> **markdown** `string`
>
> Markdown to render with PDFgen typography. Provide exactly one PDF source field.
>
> **password** `string`
>
> Password for the generated PDF; required when protect\_pdf is true and otherwise omitted.
>
> **file\_name** `string`
>
> Output filename without the .pdf extension.
>
> **expiry\_time** `number`
>
> Download URL lifetime in minutes, from 1 to 10080.
>
> **orientation** `string ("portrait" | "landscape")`
>
> PDF page orientation.
>
> **protect\_pdf** `boolean`
>
> Whether to password-protect the generated PDF.
>
> **template\_id** `string`
>
> Saved template ID to render. Provide exactly one PDF source field.
>
> #### Output
>
> **data** `string` *required*
>
> Data from the action execution
>
> **error** `string`
>
> Error if any occurred during the execution of the action
>
> **successful** `boolean` *required*
>
> Whether or not the action execution was successful or not

> [accordion] Get Account
>
> **Slug:** `PDFGEN_GET_ACCOUNT`
>
> Return the connected PDFgen account, organization, plan, and current credit usage.
>
> #### Output
>
> **data** `string` *required*
>
> Data from the action execution
>
> **error** `string`
>
> Error if any occurred during the execution of the action
>
> **successful** `boolean` *required*
>
> Whether or not the action execution was successful or not

> [accordion] Get Template
>
> **Slug:** `PDFGEN_GET_TEMPLATE`
>
> Get one saved PDFgen template, including its complete HTML content.
>
> #### Input Parameters
>
> **template\_id** `string` *required*
>
> ID of the template to retrieve.
>
> #### Output
>
> **data** `string` *required*
>
> Data from the action execution
>
> **error** `string`
>
> Error if any occurred during the execution of the action
>
> **successful** `boolean` *required*
>
> Whether or not the action execution was successful or not

> [accordion] List Templates
>
> **Slug:** `PDFGEN_LIST_TEMPLATES`
>
> List saved PDF templates owned by the connected account and return one page with a continuation cursor.
>
> #### Input Parameters
>
> **limit** `integer`
>
> Maximum templates to return in this page.
>
> **next\_cursor** `string`
>
> Continuation cursor from a previous response; omit for the first page and pass it back unchanged to fetch the next page.
>
> #### Output
>
> **data** `string` *required*
>
> Data from the action execution
>
> **error** `string`
>
> Error if any occurred during the execution of the action
>
> **successful** `boolean` *required*
>
> Whether or not the action execution was successful or not

> [accordion] List Usage Logs
>
> **Slug:** `PDFGEN_LIST_USAGE_LOGS`
>
> List recent PDFgen API calls for auditing, billing inspection, and generation troubleshooting. Returns one page with a continuation cursor. Usage logs are eventually consistent, so a just-completed call may be absent; retry after a short delay before concluding that it was not recorded.
>
> #### Input Parameters
>
> **limit** `integer`
>
> Maximum usage log records to return in this page.
>
> **next\_cursor** `string`
>
> Continuation cursor from a previous response; omit for the first page and pass it back unchanged to fetch the next page.
>
> #### Output
>
> **data** `string` *required*
>
> Data from the action execution
>
> **error** `string`
>
> Error if any occurred during the execution of the action
>
> **successful** `boolean` *required*
>
> Whether or not the action execution was successful or not

> [accordion] Update Template
>
> **Slug:** `PDFGEN_UPDATE_TEMPLATE`
>
> Partially update a saved template's name, HTML content, or rendering engine without replacing omitted fields.
>
> #### Input Parameters
>
> **name** `string`
>
> New human-readable name; omit to retain the current name.
>
> **engine** `string ("handlebars" | "legacy")`
>
> New rendering engine; omit to retain the current engine.
>
> **content** `string`
>
> New HTML template content; omit to retain the current content.
>
> **template\_id** `string` *required*
>
> ID of the saved template to update.
>
> #### Output
>
> **data** `string` *required*
>
> Data from the action execution
>
> **error** `string`
>
> Error if any occurred during the execution of the action
>
> **successful** `boolean` *required*
>
> Whether or not the action execution was successful or not
