Adding barcode or text to PDF pages

Before adding a barcode to a PDF page use the Visual Barcode Designer (VBD) to design the barcode symbol for your business process.   Then enter the VBD configuration string as a parameter for the config command.

 

To add a barcode, specify the barcode type and geometry with config command and use the barcode command:

config yQxEyto31uI6M7svFzIeY1OLNpKjyiIa36Png1ajir8D0xam+gbafveSfwcC99qPCgOTg3Kg=

output “c:\output.pdf”

  input “c:\cover.pdf”

    barcode "1234567"

To add text,  use text command.  You may optionally specify the font with the font command.

font Helvetica, 10, blue, bold

output “c:\output.pdf”

  input “c:\cover.pdf”

    text 1.0, 5.0, "This is my text"

Using placement and variables

Both the barcode and text commands offer placement parameters in order to precisely define the position of the barcode/text on a page.

Value of barcode or text might include variable references, evaluated at runtime.

To put barcode with document file name, current page and page count in the lower right corner

barcode bottom=0.2,right=0.2, "${file.$name}${page}${pages}"

To put file path in the top center and pages in the top right corner

text target=page:tc, "${file.$path}

text target=page:tr, "Page ${page} of ${pages}"

 

Note:   By default, the barcode, text and replace commands that follow the output or input commands are applied only to the first page of the document.  To apply them to multiple pages use the pages command.