Skip to main content

AztecBarcode

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

Figure 1. AztecBarcode layout element.

info

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

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

Figure 2. The Add Aztec Barcode option in the context menu adds a AztecBarcode.

Properties

PropertyValueDescription
aligncenter, left, rightA value indicating if the alignment of the AztecBarcode.
colorSee Colors Users Guide topic.A value indicating the text color.
vAlignbottom, center, topThe vertical alignment of the AztecBarcode.
valuetextThe barcode value.
xDimensionnumericA value indicating the X dimension.
idtextA value indicating the programmatic identifier of the AztecBarcode.
anglenumericA value indicating the number of degrees to rotate the AztecBarcode.
heightnumericA value indicating the height.
widthnumericA value indicating the width.
xnumericA value indicating the X coordinate.
ynumericA value indicating the Y coordinate.

Dynamically Adding Barcode Value

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

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

Figure 3. Adding an AztecBarcode layout element to a report.