PDF Generator API icon

PDF Generator API

Generate PDFs, manage templates, convert HTML/URLs to PDF, and perform PDF operations like watermarking, encryption, and optimization

Template → Create

AI-generated

Overview

This node operation creates a new PDF template by sending a complete template configuration JSON object to the PDF Generator API. It is useful for users who want to define and store custom PDF templates programmatically, including layout, pages, data settings, and editor configurations. For example, a user can create a template for invoices or reports with specific page sizes, margins, and components.

Use Case Examples

  1. Creating a new invoice template with predefined layout and data fields.
  2. Defining a report template with multiple pages and custom styling for automated PDF generation.

Properties

Name Meaning
Template Configuration JSON The complete template configuration JSON object that defines the template's name, layout, pages, data settings, and editor options. This JSON must be provided directly and include all necessary template details.

Output

JSON

  • success - Indicates if the template creation was successful
  • id - The unique identifier of the created template
  • name - The name of the created template
  • tags - Tags associated with the template
  • isDraft - Indicates if the template is a draft
  • layout - Layout configuration of the template
  • pages - Array of pages included in the template
  • dataSettings - Data settings for sorting, filtering, and transforming data in the template
  • editor - Editor configuration for the template

Dependencies

  • PDF Generator API with an API key credential

Troubleshooting

  • Ensure the template configuration JSON is valid and includes all required fields: name, layout, pages array, dataSettings, and editor objects.
  • Common error: 'templateConfiguration must be valid JSON' - occurs if the JSON is malformed or not properly parsed. Validate JSON before input.
  • API errors may occur if the API key credential is missing or invalid. Verify credentials in node settings.

Links

Discussion