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 in Switzerland for payment slips and invoices to encode payment information in a standardized format.

Typical use cases include:

  • Automatically reading payment details from scanned or digital SwissQR bills.
  • Extracting invoice or payment slip data for further processing or integration with accounting systems.
  • Automating workflows that require validation or extraction of payment information from PDFs containing SwissQR codes.

The node supports multiple input methods for the PDF file: binary data from a previous node, a base64-encoded string, or a URL pointing to the PDF file. It outputs the extracted SwissQR code data as JSON, which can be saved or used downstream in the workflow.

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 to the PDF file to read the SwissQR code from (used if Input Data Type is URL)
Output File Name Filename for the output JSON file containing the SwissQR code data (default: swissqr_code_data.json)
Async Enable asynchronous processing (true/false)

Output

The node outputs an array of items where each item contains a json field with the extracted SwissQR code data parsed from the PDF. The JSON structure represents the decoded payment information embedded in the SwissQR code, such as creditor, debtor, amount, currency, reference numbers, and other relevant payment details.

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

No binary output is produced by this operation.

Dependencies

  • Requires access to the PDF file either as binary data, base64 string, or via a URL.
  • No explicit external API keys or credentials are indicated in the provided source code snippet.
  • The node relies on internal libraries or actions to parse and decode SwissQR codes from PDFs.

Troubleshooting

  • Common Issues:

    • Providing an incorrect or unsupported PDF file format may cause the node to fail to extract the SwissQR code.
    • If the PDF does not contain a SwissQR code, the output will likely be empty or an error may occur.
    • Incorrect configuration of the input data type or mismatched binary property name can lead to failures in reading the PDF content.
  • Error Messages:

    • Errors related to missing or invalid input data typically indicate misconfiguration of the input properties.
    • Parsing errors may suggest the PDF does not contain a valid SwissQR code or the code is unreadable.
  • Resolutions:

    • Verify the PDF file contains a valid SwissQR code.
    • Ensure the input data type matches how the PDF is provided.
    • Confirm the binary property name matches the actual binary data field when using binary input.
    • Check network accessibility if providing a URL to the PDF.

Links and References

Discussion