Insert a Barcode Into an RTF Form Template

Barcodes can be included in generated PDF forms to provide a scannable representation of data. To insert a barcode into an RTF form template:

  1. Ensure that the attribute whose value is to be translated into the barcode has a name defined in Policy Modeling.
  2. In your template, insert a field for the attribute whose value is to be translated into the barcode.

    BI Publisher Field dialog showing Insert button for selected field
  3. Double-click on the field in the template to open the Oracle Analytics Publisher Properties dialog box. (If double-clicking the field does not open the dialog, re-load your XML.)
  4. Click on the Advanced tab. Enter the code for the barcode, that is, <?format-barcode:attribute_name_value;'algorithm'?>. Details of the algorithms supported by Analytics Publisher are given below.
  5. Click OK.
  6. Select the field and change the font to a font that is not being used elsewhere in the template.

    A BI Publisher field formatted to use a barcode font
  7. Save the template.
  8. In Policy Modeling, on the Projects tab, select the Forms subtab.
  9. In the Generated PDF Options section:
    1. Select the check box next to the font you used for the field in the template.
    2. Click in the Substitute Font column next to that font and in the drop-down list, select the substitute barcode font.

    PDF Font Options setting in Policy Modeling showing the substitute font for a form

The resulting form with the barcode inserted would look like this:

A generated form showing barcode inserted

When scanned with a barcode scanner, the value of the attribute in the interview should be displayed.

Tip: Signatures in forms are demonstrated in the My Store App example project installed with Policy Modeling.

Analytics Publisher barcode algorithms

Analytics Publisher provides three barcode fonts when installed: Code 128 (128R00.ttf), BC 3of9 (B39R00.ttf) and UPC/EAN (UPCR00.ttf). These fonts support the following algorithms:

  • Code 128 font supports code128a, code128b and code128c algorithms.
  • BC 3of9 font supports code39 and code39mod43 algorithms.
  • UPC/EAN font supports upca and upce algorithms.