Overview
This node converts images from input items into PDF files. It supports merging all images from multiple items into a single PDF or creating separate PDFs per item. Users can customize the PDF size, image fitting, and background color. It is useful for workflows that require packaging images into PDFs for sharing, archiving, or further processing.
Use Case Examples
- Convert multiple images from different items into a single PDF file.
- Create individual PDFs from images in each item, optionally keeping the original images.
- Customize PDF page size and image fitting to match specific document requirements.
Properties
| Name | Meaning |
|---|---|
| Destination Key | The binary key name where the generated PDF data will be stored. |
| PDF Name | The filename to assign to the output PDF file. |
| Keep Images | Whether to retain the original images in the output items after PDF creation. |
| Merge All Items | Whether to combine all images from all input items into a single PDF file. |
| Use Custom PDF Size | Whether to use custom dimensions for the PDF pages instead of the image dimensions. |
| Paper Size | The selected paper size for the PDF pages when using custom size. |
| Custom Width (Mm) | Custom width of the PDF page in millimeters (used if Paper Size is Custom). |
| Custom Height (Mm) | Custom height of the PDF page in millimeters (used if Paper Size is Custom). |
| Image Fitting | How the image is fitted into the PDF page: either scaled to fit while maintaining aspect ratio or stretched/cropped to fill the page. |
| Background Color | Background color of the PDF page, visible if the image does not fill the page. |
Output
JSON
json- The JSON output of the node, typically empty as the main output is binary PDF data.binary- The binary data containing the generated PDF file, stored under the user-defined destination key.
Dependencies
- pdfkit
- image-size
Troubleshooting
- Error 'No images found in any items!' occurs if input items do not contain any image binary data. Ensure input items have valid images.
- If no binary data exists on an item, the node throws an error. Verify that input items contain binary image data.
- PDF generation may fail if image data is corrupted or unsupported format. Use supported image formats and valid binary data.