Overview
This node integrates with the Gotenberg API to convert and manipulate PDF documents. It supports multiple operations including merging multiple PDF files into one, converting URLs or HTML content to PDFs, and splitting PDFs into smaller parts. The "Merge PDFs" operation specifically allows users to combine several PDF files (provided as binary data) into a single PDF document.
Common scenarios for the "Merge PDFs" operation include:
- Combining multiple reports or invoices into a single consolidated PDF.
- Merging scanned documents or forms submitted separately into one file.
- Aggregating multiple pages or chapters of a document before distribution.
Practical example: You have several PDF files stored in binary fields from previous workflow steps, and you want to merge them into one PDF to send as a single attachment or archive.
Properties
| Name | Meaning |
|---|---|
| PDF Files | The name of the binary field containing the PDF files to merge. Files will be merged alphanumerically. |
| Advanced Options | Additional settings affecting the output PDF: - Flatten PDF: Remove form fields and annotations. - Generate Tagged PDF: (Not applicable for merge operation) - Margins: (Not applicable for merge operation) - Metadata (JSON): JSON string to add metadata like title or author. - Omit Background: (Not applicable for merge operation) - Page Ranges: (Not applicable for merge operation) - PDF for Universal Access: Enable accessibility features. - PDF/A Format: Convert to long-term archiving PDF/A format (None, PDF/A-1b, PDF/A-2b, PDF/A-3b). - Prefer CSS Page Size: (Not applicable for merge operation) - Print Background: (Not applicable for merge operation) - Scale: (Not applicable for merge operation) - Single Page: (Not applicable for merge operation) - Wait Delay: (Not applicable for merge operation) |
Output
The node outputs an array of items, each containing:
jsonobject with:success: Boolean indicating if the operation succeeded.operation: The operation performed ("mergePdfs").filename: The filename of the resulting merged PDF (usually ends with.pdf).contentType: MIME type of the output file (application/pdf).size: Size in bytes of the resulting PDF.
binarydata containing the merged PDF file under the keypdf.
If the result is a ZIP archive (not typical for merge), it will be under the key zip with MIME type application/zip.
Dependencies
- Requires connection to a Gotenberg API server endpoint, configured via credentials that provide the base URL and authentication token.
- The node uses HTTP POST requests with multipart/form-data encoding to communicate with the Gotenberg API.
- No other external dependencies are required.
Troubleshooting
- Missing or incorrect binary field name: If the specified binary field does not exist or contains non-PDF data, the merge will fail. Ensure the binary field name matches exactly and contains valid PDF files.
- API connectivity issues: Network problems or incorrect API base URL/credentials can cause request failures. Verify the Gotenberg API endpoint and credentials.
- Invalid metadata JSON: If the metadata string is malformed JSON, the API may reject the request. Validate JSON syntax before input.
- Large files or many PDFs: Merging very large PDFs or many files might cause timeouts or memory issues on the API server.
- Error messages: Errors thrown by the node typically include the API error message. Check the message for hints such as invalid parameters or unsupported file formats.
To resolve errors:
- Double-check all input parameters and binary field names.
- Confirm API credentials and network access.
- Validate any JSON inputs.
- Retry with fewer or smaller PDF files if resource limits are suspected.