0CodeKit icon

0CodeKit

A toolbox of no-code utilities

Actions114

PDF → Create PDF

AI-generated

Overview

This node operation creates a new PDF document with specified dimensions and number of pages. It allows users to define the width and height of each page in points, the total number of pages to create, and optionally specify the filename for the generated PDF. It also supports returning the PDF as a URL if desired.

Use Case Examples

  1. Generating a blank PDF document with 5 pages, each page sized 600x800 points, and saving it with a specific filename.
  2. Creating a PDF with custom page dimensions and retrieving the PDF as a URL for easy sharing or download.

Properties

Name Meaning
Code Variables Allows setting code variables defined in the code editor for the selected function, useful for dynamic content generation within the PDF creation process.
Get File as URL Boolean option to specify whether the created PDF should be returned as a URL instead of a file buffer.
Filename The filename to assign to the created PDF file.
Pages The number of pages to create in the PDF document.
Width of Page The width of each page in the PDF, measured in points.
Height of Page The height of each page in the PDF, measured in points.

Output

JSON

  • pdfUrl - URL of the created PDF if 'Get File as URL' is true.
  • pdfBuffer - Binary buffer of the created PDF if 'Get File as URL' is false.
  • fileName - The filename of the created PDF.

Dependencies

  • Requires an API key credential for the CodeKit API to perform PDF creation operations.

Troubleshooting

  • Ensure that the width and height of the page are set to positive numbers greater than zero, as zero or negative values may cause errors.
  • If 'Get File as URL' is enabled, verify that the API returns a valid URL and that the URL is accessible.
  • If the node fails, check that the API key credential is correctly configured and has permissions for PDF creation.
  • Common error messages may include invalid parameter values or API authentication errors; verify input parameters and credentials accordingly.

Links

Discussion