Skip to main content
Skip table of contents

Barcodes

iText DITO can render a scannable barcode from alphanumeric data to include in a PDF document. There is a wizard that helps you insert a barcode element at the cursor position.

How to Insert a Barcode

Click the Barcode Icon in the Toolbox

Position the cursor where you want to insert the barcode in the template's editing canvas. Then click the barcode control in the toolbox.

Configure the Barcode

 A three-step wizard pops up that will let you configure the barcode.

The first step in this wizard is the selection of a barcode type.

The second step requires you to bind the barcode to a field from your data collection.

Click the ellipsis to bring up the data selection dialog. You can also add an alternative description to the barcode.

When your template is set up for PDF/UA compliance, the alternative description is a required field.

In the third step of the wizard you can configure display settings and specific barcode settings.

  • Width and height of the bar code image (click the link icon to maintain the aspect ratio)
  • Width of the bars in the code, as well as bar color and background color
  • Detailed settings of the barcode
    • for two-dimensional barcodes these details include
      • display, size, font, face and position of the value
      • display of guard bars

In the editing canvas a barcode placeholder is inserted at the cursor position, In the preview you can see the actual barcode that is generated with your data. In the example below the barcode binding is inserted in a loop. 

Editing Barcode Configurations

When the barcode is inserted, the Template Elements tree will show two entries for a barcode. A barcode element and a child element called barcode-view. Optionally, if you insert a label for the barcode a rich text element can also be a child element of the barcode element.

Select the barcode element to:

  • delete the barcode
  • switch to a different type
  • change the data bind
  • define layout for the image that contains the barcode

Select the barcode-view child element to:

  • edit the display settings of the actual barcode (bar color and size, value display etc)

Supported Barcode Types

iText DITO supports the following barcode types:

Two-dimensional Types

  • Code 128
  • Code 39
  • Codabar
  • EAN-8
  • EAN-13
  • Interleaved 2 of 5
  • MSI
  • Postnet
  • Planet

Three-dimensional Types

  • PDF 417
  • QR code
  • Data Matrix


JavaScript errors detected

Please note, these errors can depend on your browser setup.

If this problem persists, please contact our support.