Anchor variables

Anchors are text objects on the PDF page whose location provides an alignment point for text and barcode insertion or substitution.   The anchor pattern is defined by the pattern parameter of the anchor command.  Once the search pattern is found it provides the following data:

Syntax

The pattern format, that will be searched in the text, is of the form:

[prefix]PatternText[Separator][${}][suffix]

Parameters

prefix

String of non-alphanumeric characters (optional)

PatternText

String starting with alphanumeric characters

Separator

One of the following characters =  :  – (optional)

${}

Placeholder for anchor value substring (optional because anchors may possess only a position)

suffix

String of characters (optional)

Notes

Examples

Search for phrase starting with ##User Name: and ending with  ##.  Name the anchor UserName.  Use the text from the ”:” to the second “##” as the value of a barcode.
In this example if text contains: ##User Name:John Doe## then the barcode value is John Doe.

anchor ##User Name:${}##, name = UserName

barcode ${UserName}

 

If PDF text contains the phrase “OrderID=876534”.  The following command will create a barcode with value “876534” placed just below (default placement) this phrase.

anchor OrderID=${}

barcode target=OrderID, ${OrderID}

 

To simplify the notation, the  ${anchor} variable can be used.  

anchor OrderID=${}

barcode target=OrderID, ${anchor}

 

To delete anchor pattern text (replace it with a null string)

anchor OrderID=${}

replace target=OrderID, ""

An alternative notation is  

replace ${OrderID.text}, ""

 

Syntax legend
 

Format

Meaning

Italic

Information that the user must supply
 

Bold

Elements that the user must type exactly as shown.

Between brackets ([])

Optional items
 

Ellipsis (...)

Parameter that can be repeated several times