Pdforge icon

Pdforge

Generate PDF or PNG with pdforge

Overview

This node integrates with the Pdforge API to generate PDF documents or PNG images based on predefined templates. Users select a template and provide variables to populate it, enabling automated creation of customized PDFs or images. This is useful for generating invoices, reports, certificates, or any document/image that follows a consistent format but requires dynamic content.

Typical use cases include:

  • Automatically creating personalized PDF invoices from order data.
  • Generating certificates or badges as PNG images with user-specific details.
  • Producing reports in PDF format with dynamically filled charts or tables.

Properties

Name Meaning
Template Name or ID The identifier of the template to use for generation. Choose from a list loaded dynamically from Pdforge or specify an ID manually or via expression.
Variables JSON object containing key-value pairs to fill the placeholders in the selected template. These variables customize the generated output.

Output

The node outputs an array of JSON objects corresponding to each input item processed. Each JSON object contains the response from the Pdforge API after generating the PDF or image. The exact structure depends on the API response but generally includes metadata about the generated file and possibly a URL or binary reference to the created document/image.

If the node generates images (PNG), the output will represent the image data or a link to it. For PDFs, the output similarly represents the generated document.

Dependencies

  • Requires an active Pdforge API account and an API authentication token configured in n8n credentials.
  • The node makes HTTP requests to https://api.pdforge.com.
  • The "Template Name or ID" options are dynamically loaded from the Pdforge integration endpoint /integration/templates.

Troubleshooting

  • Invalid Template ID: If the specified template ID does not exist or is incorrect, the API will likely return an error. Verify the template ID by loading options or checking the Pdforge dashboard.
  • Malformed Variables JSON: Providing invalid JSON in the "Variables" field will cause parsing errors. Ensure the JSON syntax is correct.
  • API Authentication Errors: Missing or invalid API credentials will prevent successful requests. Confirm the API key/token is correctly set up in n8n.
  • Network Issues: Connectivity problems to api.pdforge.com will cause request failures. Check network access and firewall settings.
  • Async Operation Misconfiguration: If using asynchronous operation mode (not shown in provided properties but referenced in code), ensure webhook URLs are properly configured.

Links and References

Discussion