0CodeKit icon

0CodeKit

A toolbox of no-code utilities

Actions132

PDF → Create Empty PDF

AI-generated

Overview

The node provides utilities for creating and manipulating PDFs within n8n workflows. Specifically, the "Create Empty PDF" operation allows users to generate a new blank PDF document with customizable page count and dimensions. This is useful when you need a starting PDF file to which you can later add content or use as a placeholder in automated document workflows.

Practical examples include:

  • Generating a blank multi-page PDF as a template for reports.
  • Creating empty PDFs of specific sizes for printing or digital distribution.
  • Automating document generation pipelines where an initial PDF file is required before adding dynamic content.

Properties

Name Meaning
Return as URL Whether to return the generated PDF as a downloadable URL (true/false).
Number of Pages The number of pages to include in the new PDF document (default is 1).
Page Width The width of each page in points (default is 595 points, roughly A4 width).
Page Height The height of each page in points (default is 842 points, roughly A4 height).
File Name The desired name for the output PDF file.

Output

The node outputs JSON data representing the result of the PDF creation request. If "Return as URL" is enabled, the output will include a URL from which the generated PDF can be downloaded. Otherwise, the PDF content may be returned directly (though this depends on the underlying service implementation).

If binary data output is supported, it would represent the raw PDF file content suitable for further processing or saving.

Dependencies

  • Requires an API key credential for authenticating requests to the external PDF generation service at https://prod.0codekit.com.
  • The node sends a POST request to the /pdf/create endpoint with parameters specifying the PDF properties.
  • No additional environment variables are explicitly required beyond the API authentication.

Troubleshooting

  • Common issues:

    • Invalid page dimensions or zero/negative page count may cause errors or unexpected results.
    • Missing or invalid API credentials will prevent successful communication with the PDF service.
    • Network connectivity problems can cause request failures.
  • Error messages:

    • Authentication errors typically indicate missing or incorrect API keys; verify credentials.
    • Validation errors may occur if page size or count parameters are out of acceptable ranges; ensure values are positive numbers.
    • Timeout or network errors suggest connectivity issues; check internet access and service availability.

Links and References

Discussion