Skip to main content
Skip table of contents

.Barcodes viText_DITO_1.4

How to Insert a Barcode

iText DITO can render a scannable barcode from alphanumeric data. There is a wizard that helps you insert a barcode element in cursor position.

Point and 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.


in the second step you bind the barcode to a field in the data collection. Click the tree dots to bring up the data selection dialog. You can also add an alternative description to the barcorde. 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 barcode specicific settings.

  • Width and height of the bar code image (click the link icon 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 in cursor position, In 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 also a rich text element can be a child element of the barcode element.

Select the barcode element to:

  • delete the barcode
  • switch to a different tpe
  • 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
  • Ponstnet
  • 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.