Alignment

To place new element (barcode or text) it's position can be identified in respect to an element already present on a page.  Such element, called target,  can be page edges or an existing text or barcode.  Both target and element are represented by a rectangle.  

Alignment point (AP) is one of the corners of the rectangle, center of one of the sides, or center of the rectangle.  

Placement of barcode or text is uniquely identified by:

Alignment points

Alignment points are located in the corners, centers of sides and center of rectangle.

Barcode element rectangle includes quiet zone (required white area around barcode) and optional readable text (for 1D barcodes).  Barcode rectangle is can be a target in last placement or an element in barcode command.

alignbc.gif

For anchor placement target is rectangle includes text of anchor pattern and anchor value (if present).   Text rectangle also can be an element placed by text command or target of last placement.

aligntext.gif

For page, footer and header placement target is a whole page.   Page rectangle is a whole page. Alignment points are located on the edge of the page and in center.

alignpage.gif

Target and Element Alignment

Each placement implicitly and explicitly identifies target and element alignment points.  
The following demonstrates few alignment pairs using anchor as a target and barcode as an element.
 

anchor "Order"
barcode target=Order:bl:tl, "12345"

alignanchorbc.bl.tl.gif

 

anchor "Order"
barcode target=Order:tr:tl, "12345"

alignanchorbc.tr.tl.gif

 

anchor "Order"
barcode target=Order:cr:cl, "12345"

alignanchorbc.cr.cl.gif

 

Alignment displacement

After elements are aligned their precise location is controlled by relative displacement of alignment points.  Displacement parameters are:

 

Offsets specify shift left, right, up or down.   Negative value shifts in opposite direction.  If both left and right offset are specified they are combined.   If both up and down offsets are specified they are combined.  Example of offset displacement:
 

anchor "Order"
barcode target=Order:bl:tl, down=0.5, right=0.8, "12345"

alignanchorbc.bl.tl.down.right.gif

 

Margins (left, top, right, bottom) specify distance from the corresponding edge of the page toward center of the page.  Only margins corresponding to TargetAP are used (e.g. if TargetAP is BottomRight, left and top margins are ignored)  Negative values of margins force placement outside of the page.  Example of margin displacement:
 

barcode top=0.5, right=1.0, "12345"

                   alignpaget.tr.trl.gif