Pdforge icon

Pdforge

Generate PDF or PNG with pdforge

Overview

This node integrates with the pdforge API to convert HTML content into PDF files asynchronously. It is designed for scenarios where you have raw HTML markup (including the full <html> tag) that needs to be rendered as a PDF document, and you want the conversion process to happen in the background. Upon completion, the generated PDF can be sent to a specified webhook URL or optionally stored in an S3 bucket.

Practical examples include:

  • Generating invoices, reports, or tickets from dynamic HTML templates.
  • Converting web page snapshots or email templates into PDFs for archival.
  • Offloading heavy PDF rendering tasks to an asynchronous workflow, improving responsiveness.

Properties

Name Meaning
HTML String The complete HTML string to convert into a PDF file. Must include the entire <html> tag.
Print Parameters JSON object specifying PDF print options such as page format, width, height, margins, etc. Refer to pdforge PDF parameters documentation for available settings.
Webhook URL A URL endpoint where the node will POST the rendered PDF file once the asynchronous conversion completes. Useful for triggering downstream processes or notifications.
Options Collection of additional options:
S3 Bucket: ID of an active S3 connection configured in pdforge to override default storage location.
S3 Key: Path inside the S3 bucket (folders + filename without extension) where the PDF will be saved.

Output

The node outputs a JSON array containing the response(s) from the pdforge API after submitting the HTML-to-PDF conversion request(s). Each item in the output corresponds to one input item processed.

The JSON output typically includes metadata about the submitted job, such as job IDs, status, and possibly URLs or references to the generated PDF once ready.

If binary data is involved, it would represent the generated PDF file; however, in this asynchronous operation, the actual PDF is delivered via the webhook or stored externally rather than returned directly in the node output.

Dependencies

  • Requires an active API key credential for authenticating with the pdforge service.
  • Optional integration with S3-compatible storage configured within pdforge for saving output files.
  • The webhook URL must be publicly accessible to receive POST callbacks from pdforge upon job completion.

Troubleshooting

  • Common issues:

    • Invalid or incomplete HTML string may cause rendering failures.
    • Incorrect or unsupported print parameters could lead to errors or unexpected PDF layouts.
    • If the webhook URL is unreachable or misconfigured, the node will not receive the rendered PDF callback.
    • Missing or incorrect S3 bucket/key configuration may prevent file storage.
  • Error messages:

    • Authentication errors indicate invalid or missing API credentials—verify your API key setup.
    • Validation errors on input parameters suggest malformed JSON or unsupported options—check the Print Parameters JSON syntax and values.
    • Network errors when calling the webhook imply connectivity or firewall issues—ensure the webhook endpoint is accessible from the internet.

Links and References

Discussion