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

Overview

The node integrates with a PDF Generator API to perform various PDF-related operations, including managing templates, generating documents from templates, converting HTML or URLs to PDFs, and processing existing PDFs (e.g., watermarking, encryption). Specifically, the Template - Get operation retrieves detailed information about a specific PDF template by its ID.

This node is beneficial in scenarios where users need to automate document generation workflows, manage PDF templates programmatically, or integrate PDF creation and manipulation into their automation pipelines. For example, a user can fetch a template's configuration to review or modify it before generating documents, or to display template details in a dashboard.

Properties

Name Meaning
Template Select the template to work with. You can choose a template either from a searchable list or enter its numeric ID directly. This identifies which template will be retrieved by the "Get" operation.

Output

The output JSON contains the full details of the requested template as returned by the PDF Generator API. This typically includes:

  • Template metadata such as name, ID, tags, draft status.
  • Layout configuration including page size, orientation, margins.
  • Pages array describing each page's components, layout, and styling.
  • Data settings related to sorting, filtering, and data transformation.
  • Editor settings and other template-specific options.

The output structure mirrors the template object stored in the PDF Generator system, enabling further processing or inspection downstream in the workflow.

No binary data is produced for this operation; all data is returned as JSON.

Dependencies

  • Requires an API key credential for the PDF Generator API service.
  • The node uses authenticated HTTP requests to the API base URL (default: https://us1.pdfgeneratorapi.com/api/v4).
  • Proper API credentials must be configured in n8n for authentication.

Troubleshooting

  • Invalid Template ID: If the provided template ID is not numeric or does not exist, the API will return an error. Ensure the ID is correct and accessible.
  • Authentication Errors: Missing or invalid API credentials will cause request failures. Verify that the API key credential is correctly set up.
  • Network Issues: Connectivity problems to the API endpoint may cause timeouts or errors. Check network access and proxy settings if applicable.
  • JSON Parsing Errors: The node expects valid JSON responses. Malformed responses or unexpected data formats may cause errors.

If the node throws an error stating the operation is unsupported, verify that the resource is set to "template" and the operation to "get".

Links and References

Discussion