0CodeKit icon

0CodeKit

A toolbox of no-code utilities

Actions108

Overview

The node provides a versatile toolbox of no-code utilities, including PDF manipulation capabilities. Specifically, the "Create PDF" operation under the "PDF" resource allows users to generate new PDF documents programmatically. This is useful in scenarios where automated report generation, invoice creation, or dynamic document assembly is required within workflows.

For example, you can create a multi-page PDF with custom dimensions, which can then be saved, shared, or further processed downstream. This operation supports specifying the number of pages and page size, enabling tailored PDF outputs for various business or personal needs.

Properties

Name Meaning
Code Variables A collection of code variables defined in an associated code editor function. Each variable has a name (or ID) and a value. Useful for passing dynamic data into code-based operations.
Get File as URL Boolean option to specify whether the resulting PDF should be returned as a URL link instead of raw data.
Filename The desired filename for the generated PDF file.
Pages Number of pages to create in the PDF document.
Width of Page Width of each page in points (1 point = 1/72 inch).
Height of Page Height of each page in points.

Output

The output JSON contains the result of the PDF creation operation. Typically, this will include either:

  • The binary content of the created PDF (if not requesting a URL), which can be used directly or saved.
  • A URL pointing to the generated PDF file if the "Get File as URL" property is set to true.

This enables flexible handling of the PDF output depending on workflow requirements, such as immediate download, storage, or sharing.

Dependencies

  • Requires an API key credential for authentication with the external service providing the PDF creation functionality.
  • The node depends on an external API endpoint that handles PDF generation based on the provided parameters.
  • No additional environment variables are explicitly required beyond the API key credential.

Troubleshooting

  • Common issues:

    • Incorrect page dimensions (width or height set to zero or invalid values) may cause errors or unexpected PDF output.
    • Omitting the number of pages or setting it to zero might result in no PDF being created.
    • If "Get File as URL" is enabled but the external service fails to generate a URL, the node may return an error or empty response.
    • Network or authentication failures due to missing or invalid API credentials.
  • Error messages:

    • Errors related to invalid input parameters typically indicate missing or malformed properties like page size or page count.
    • Authentication errors suggest checking the configured API key credential.
    • Timeout or connectivity errors imply network issues or service unavailability.

To resolve these, verify all required properties are correctly set, ensure valid API credentials are configured, and confirm network connectivity to the external service.

Links and References

Discussion