Skip to main content

LinearBarcode


The LinearBarcode layout element allows adding linear barcodes to a report.

DynamicPDF API has built-in support for the LinearBarcode layout element. A LinearBarcode layout element can be placed on a page or any report section.

info

Refer to designer-usersguide-examples for a GitHub example.

Figure 1. Statically adding a LinearBarcode layout element to a DLEX document's Page.

Add a LinearBarcode layout element to a report by right-clicking anywhere in a page or report and selecting Add Linear Barcode from the context menu.

Figure 2. Adding a LinearBarcode layout element using the the Add Linear Barcode choice in the context menu.

Dynamically Adding Barcode Value

Of course, Designer's true power lies in dynamically generated reports, and barcodes are no exception. The LinearBarcode layout element allows dynamically specifying the value property as the JSON data field name surrounded by pounds, for example, #upc#.

  "Coffees": [
{
"ProductID": 568,
"Type": "Arabica",
"Variety": "Arusha",
"Price": 7.33,
"upc": "12345678901"
},
...

Figure 3. Dynamically adding a barcode to a report's data rows.

Properties

PropertyValueDescription
aligncenter, left, right
colorSee Colors Users Guide topic.A value indicating the text color of the LinearBarcode.
gs1DataBarTypeomnidirectional, limited, expanded
linearBarcodeTypesee below
showTexttrue, false
supplementValuetextThe supplemental value for a LinearBarcode. Only linearBarcodeType values that support a supplementalValue can be used.
textColorSee Colors Users Guide topic.Text color of the LinearBarcode.
vAlignbottom, center, topThe vertical alignment of the LinearBarcode.
valuetextThe barcode value.
xDimensionnumericThe x dimension of the LinearBarcode.
idtextA value indicating the programmatic identifier of the LinearBarcode.
anglenumericA value indicating the number of degrees to rotate the LinearBarcode.
heightnumericA value indicating the height of the LinearBarcode.
widthnumericA value indicating the width of the LinearBarcode.
xnumericA value indicating the X coordinate of the LinearBarcode.
ynumericA value indicating the Y coordinate of the LinearBarcode.

Supported Linear Barcodes

The following linear barcodes are supported.

  • Codabar
  • Code 128
  • Code 2 of 5
  • Code 3 of 9 & extended 3 of 9
  • Code 11
  • Code 93 & extended 93
  • EAN/JAN 13
  • EAN/JAN 13 Supplement 2
  • EAN/JAN 13 Supplement 5
  • EAN 14/GTIN-14
  • EAN/JAN 8
  • EAN/JAN 8 Supplement 2
  • EAN/JAN 8 Supplement 5
  • GS1 Databar (RSS)
  • IATA 2 of 5
  • Interleaved 2 of 5
  • ISBN
  • ISBN Supplement 2
  • ISBN Supplement 5
  • ISMN
  • ISMN Supplement 2
  • ISMN Supplement 5
  • ISSN
  • ISSN Supplement 2
  • ISSN Supplement 5
  • ITF 14
  • MSI Barcode (Modified Plessey)
  • Stacked GS1 Databar
  • UPC Version A
  • UPC Version A Supplement 2
  • UPC Version A Supplement 5
  • UPC Version E
  • UPC Version E Supplement 2
  • UPC Version E Supplement 5