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 generates a barcode image from a given text input. It supports a wide variety of barcode types, including QR codes, Code 128, EAN, UPC, Data Matrix, and many specialized postal and industrial barcode formats. Users can customize the barcode type, choose whether to display the encoded text alongside the barcode, and configure advanced options such as generating an inline image URL or applying custom profile settings.

This node is beneficial in scenarios where automated barcode generation is needed for labeling, inventory management, shipping, ticketing, or document processing workflows. For example, it can be used to generate QR codes for URLs, product barcodes for retail, or postal barcodes for mailing systems.

Properties

Name Meaning
Text The text content to encode into the barcode. This is the data that will be represented by the generated barcode image.
Barcode Type The format/type of barcode to generate. Options include a large selection such as QR Code, Code 128, EAN-13, UPC-A, Data Matrix, Aztec, PDF417, and many postal and industry-specific barcode standards.
Hide Text Boolean option to hide or show the human-readable text alongside the barcode image. If true, the text will not be displayed with the barcode.
Binary Data Output Name Custom name for the binary output data field in the node's output. Defaults to "data". This allows users to specify how the barcode image binary data is referenced downstream in the workflow.
Advanced Options Collection of additional optional settings:
- Generate Inline URL: Whether to produce an inline image URL instead of raw binary data.
- Custom Profiles: JSON string to adjust barcode generation properties (see external docs).

Output

The node outputs the generated barcode image as binary data. The binary data contains the image file representing the barcode in a suitable format (e.g., PNG). The output binary property name can be customized via the "Binary Data Output Name" property.

If the "Generate Inline URL" advanced option is enabled, the output may also include an inline image URL representation of the barcode image.

The json output field typically contains metadata about the generated barcode or the original input text, depending on implementation details, but primarily the useful output is the binary image data.

Dependencies

  • Requires access to the Pdf4me API service or similar backend capable of generating barcode images.
  • Needs proper API authentication configured in n8n credentials to interact with the barcode generation service.
  • The "Custom Profiles" advanced option references external documentation at https://dev.pdf4me.com/documentation/ for detailed configuration of barcode generation parameters.

Troubleshooting

  • Common Issues:

    • Invalid or unsupported barcode type selected may cause errors or no output.
    • Input text that does not conform to the requirements of the chosen barcode type (e.g., length or character restrictions) may result in generation failure.
    • Missing or incorrect API credentials will prevent barcode generation.
    • Improperly formatted JSON in the "Custom Profiles" advanced option can cause parsing errors.
  • Error Messages:

    • Authentication errors indicate missing or invalid API keys; verify credential setup.
    • Validation errors related to barcode type or text input suggest checking the input values against supported formats.
    • JSON parsing errors for custom profiles require ensuring valid JSON syntax.

Links and References

Discussion