PDF4me icon

PDF4me

Comprehensive PDF and document processing: generate barcodes, convert files, extract data, manipulate images, and automate workflows with the PDF4ME API

Actions80

Overview

The node operation "Split PDF By Swiss QR" processes a PDF document to split it based on the presence of Swiss QR codes within the pages. This is particularly useful in scenarios where a PDF contains multiple invoices or payment slips each identified by a Swiss QR code, and you want to separate these into individual documents for easier handling, processing, or archiving.

Typical use cases include:

  • Automating invoice processing workflows by splitting bulk PDFs containing multiple Swiss QR-coded payment slips.
  • Preparing documents for batch submission or review by separating them at QR code boundaries.
  • Extracting specific sections of a PDF that correspond to different transactions or clients identified by Swiss QR codes.

Properties

Name Meaning
Input Data Type Method to provide the PDF data:
- Base64 String: Provide PDF content as a base64 encoded string.
- Binary Data: Use PDF file from previous nodes.
- URL: Provide URL to PDF file.
Binary Property Name The name of the binary property in the input data that contains the PDF file (used when Input Data Type is Binary Data).
Base64 Content The base64 encoded PDF content (used when Input Data Type is Base64 String).
PDF URL URL pointing to the PDF file to process (used when Input Data Type is URL).
Split QR Page Defines where to split relative to the Swiss QR page:
- After: Split after the page containing the QR code.
- Before: Split before the page containing the QR code.
Combine Pages With Same Barcodes Whether to combine consecutive pages that have the same QR code into a single output PDF.
PDF Render DPI The resolution (dots per inch) used to render the PDF for processing the QR codes. Options are 100, 150, 200, or 250 DPI.
Output File Name The filename to assign to the output PDF files generated after splitting.
Advanced Options Custom JSON profiles to adjust additional properties for the underlying API calls. Users can specify extra options following the external API documentation.
Binary Data Output Name Custom name for the binary data field in the node's output, allowing users to rename the output binary property for clarity or integration purposes.

Output

The node outputs one or more PDF files as binary data, each representing a segment of the original PDF split according to the detected Swiss QR codes and user settings.

  • The json output contains metadata about the split operation and possibly information about the QR codes found.
  • The binary data output contains the actual PDF files resulting from the split operation.
  • The binary data property name can be customized via the "Binary Data Output Name" property.

Dependencies

  • Requires access to the PDF4me API service for PDF processing and splitting functionality.
  • An API key credential or equivalent authentication token must be configured in n8n to authorize requests to the PDF4me service.
  • Internet connectivity is required if the PDF is provided via URL or if the node needs to communicate with the external API.

Troubleshooting

  • Common Issues:

    • Invalid or inaccessible PDF URL: Ensure the URL is reachable and points directly to a valid PDF file.
    • Incorrect binary property name: Verify that the binary property name matches the actual property containing the PDF in the input data.
    • Insufficient API permissions or invalid API key: Confirm that the API key is valid and has permissions for PDF splitting operations.
    • Large PDFs or high DPI settings may cause timeouts or performance issues; consider lowering the DPI or splitting the input beforehand.
  • Error Messages:

    • Errors related to missing or malformed PDF data usually indicate incorrect input configuration.
    • API errors might mention authentication failures or quota limits; check API credentials and usage limits.
    • If the node throws errors about QR code detection failure, verify that the PDF actually contains Swiss QR codes and that the DPI setting is appropriate.

Links and References

Discussion