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

This node operation, Read SwissQR Code, extracts data encoded in a SwissQR code embedded within a PDF file. SwissQR codes are commonly used on Swiss payment slips to encode payment information such as creditor and debtor details, amounts, and references.

Typical use cases include:

  • Automating the extraction of payment information from scanned or digital Swiss payment slips.
  • Integrating with accounting or invoicing workflows to process payment data without manual entry.
  • Validating or archiving payment slip data extracted directly from PDFs.

For example, a user can provide a PDF containing a SwissQR code either as binary data from a previous node, as a base64 string, or via a URL. The node then reads and decodes the SwissQR code, outputting the extracted data as JSON for further processing.

Properties

Name Meaning
Input Data Type Method to provide the PDF file:
• Binary Data (from previous node)
• Base64 String
• URL
Input Binary Field Name of the binary property containing the PDF file (used if Input Data Type is Binary Data)
Base64 PDF Content Base64 encoded content of the PDF file (used if Input Data Type is Base64 String)
PDF URL URL pointing to the PDF file (used if Input Data Type is URL)
Output File Name Filename for the output JSON file containing the SwissQR code data
Async Enable asynchronous processing (true/false)

Output

The node outputs a JSON object representing the decoded SwissQR code data extracted from the PDF. This JSON typically includes structured payment information such as:

  • Creditor and debtor details (name, address, IBAN)
  • Payment amount and currency
  • Reference numbers
  • Additional payment information encoded in the SwissQR code

If configured, the node also outputs this data as a JSON file named according to the "Output File Name" property.

No binary output is produced by this operation; the output is purely JSON data representing the SwissQR code contents.

Dependencies

  • Requires access to the PDF file either as binary data, base64 string, or via a downloadable URL.
  • No explicit external API keys or credentials are required for this operation.
  • The node depends on internal libraries capable of parsing PDFs and decoding SwissQR codes.

Troubleshooting

  • Common issues:

    • Providing an invalid or corrupted PDF file will cause the node to fail reading the SwissQR code.
    • If the PDF does not contain a SwissQR code, the output may be empty or an error may be thrown.
    • Incorrectly specifying the binary property name when using binary input will result in missing input data errors.
    • Network issues or invalid URLs will prevent loading the PDF when using the URL input method.
  • Error messages and resolutions:

    • "Binary property not found" — Verify the binary field name matches the actual property containing the PDF.
    • "Failed to download PDF from URL" — Check the URL accessibility and network connectivity.
    • "SwissQR code not found in PDF" — Confirm that the PDF contains a valid SwissQR code.
    • Parsing errors — Ensure the PDF is not encrypted or corrupted.

Enabling the "Async" option can help with processing large files or slow network responses by running the operation asynchronously.

Links and References

Discussion