Font and Positioning Commands

Overview

Use the following Font and Positioning commands when designing tickets to print to a laser printer.

Font Commands

Use the following commands to set a font name, size, and style (normal or bold). All commands are surrounded by square brackets [  ]. 

[FONT NAME] "font name'

The font name command can be used with any available Windows font typeface. The name of the font must be surrounded by double quotes. For example:

  • [FONT NAME] “Courier New”  
  • [FONT NAME] “Times New Roman"

[FONT SIZE] “font size

The font size is a numeric value used to set the size of the printed text. The bigger the number, the larger the printed text. Ten (10) and Twelve (12) are the most common font sizes. The font size must be surrounded by double quotes. For example: 

  • [FONT SIZE] “10"
  • [FONT SIZE] “12"

[FONT NORM]

The font will print in its regular normal font style. 

[FONT BOLD]

The font will print in a bold style.

Font Commands

Ticket printing will use the current command until it encounters a new command. For example; [FONT BOLD] will bold all text until ticket printing reads a [FONT NORM] command.

Position Commands

All position commands are based on inches from the left side or top of the page.

[HPOS] “0.0”

Text will start at the specified number of inches in quotes. For example:

  • [HPOS] “2.0” "Ticket Number:  "
    • The above command will print the static text Ticket Number two (2) inches from the left side of the page.
  • [HPOS] “3.25” [Ticket Number]
    • The above command will print the Ticket Number database field three and a quarter (3.25) inches from the left side of the page.

[HRPOS] “0.0”

The HRPOS command can be used to right justify text. It is a little trickier to use, but once mastered, the decimal in monetary values will line up. Keep in mind:

  • Put a bogus [HPOS] "0.0" command in front of the text to be right justified.
  • The static text or database field command is to be placed after the  [HPOS] "0.0" command.
  • Place the [HRPOS] command behind the text or database field command that is to be right justified.
  • The end of text or database field will be at the specified number of inches in quotes. 

The following example has been used in several customer tickets. The static text on all four lines will print 3.3 inches from the left. The bogus [HPOS] "0.0" command has been placed in front of the commands to be right justified. All of the commands following the  [HPOS] "0.0" command are monetary database fields. Interact will start to print the database field at 7.75 inches and print the remining data to the left of this position.

F [HPOS] "3.3" "Base Tip fee or Service Charge "                            [HPOS] "0.0" [Grand Total Base Charge1] [HRPOS] "7.75"
F [HPOS] "3.3" "County Environmental Service Charge "                [HPOS] "0.0" [Grand Total Base Charge2] [HRPOS] "7.75"
F [HPOS] "3.3" "MN Solid Waste Mgmt Tax 17% "                          [HPOS] "0.0" [Grand Total Base Charge3] [HRPOS] "7.75"
F [FONT BOLD] [HPOS] "3.3" "TOTAL DUE "                                    [HPOS] "0.0" [Grand Total Charge] [HRPOS] "7.75"

The following is an example of the printed ticket.

[VPOS] “0.0”

The VPOS command is used to set the vertical position in inches from the top of the page. Use this command to position a line (like a signature line) in the same place every time a ticket is printed. The length of a ticket will vary when it has been designed for multiple item printing. The signature line will print in the same place regardless of the number of items in the transaction. 

[XYPOS] “0.0,0.0”

Use the XYPOS command to set a horizontal (X) and vertical (Y) position at the same time.

[Copy Ticket] Command

The [Copy Ticket] ticket command has the ability to print multiple copies of a ticket on a page when using a Windows printer such as a laser printer or Deskjet printer.

How to use

The ticket keyword: [Copy Ticket] is followed by the vertical position of the next copy. The command must appear on a footer line. The vertical position must be surrounded in quotes.

Example #1:

F [Copy Ticket] "5.0"
This will print another copy of the ticket starting 5 inches from the top of the page. The keyword can be used multiple times with different vertical positions to get any number of copies of the ticket on a page.

Example #2

To print an image on multiple pages using the Copy Ticket command a (H)eader line must appear before the image line. The (H)eader line will initiate a new page. The image cannot be created unless the page already exists.

The following example will not work because a text line before the image lines to create a new page is missing.
H {IMAGE "AWSlogo,0.5,0.5,3,1"}
H {IMAGE "AWSlogo,0.5,11.5,3,1"}
H {IMAGE "AWSlogo,0.5,22.5,3,1"}
F [COPY TICKET] "11.5" [COPY TICKET] "22.5"

The correct way to format the ticket is to include a Header line before the image lines.
H
H {IMAGE "AWSlogo,0.5,0.5,3,1"}
H {IMAGE "AWSlogo,0.5,11.5,3,1"}
H {IMAGE "AWSlogo,0.5,22.5,3,1"}
F [COPY TICKET] "11.5" [COPY TICKET] "22.5"

When the copy ticket command is issued the blank header line will initiate a new page. Now that the page exists, the image has a place to print.

VPOS Command

The VPOS command is not replicated with each ticket copy. The command can be used with the copy ticket command, but a separate command for each ticket must be issued. The examples below demonstrate how to use the VPOS command with the Copy Ticket command

Helpful Reminders

  • The font typefaces (names) must exist on the computer (Windows operating system) used to print the tickets.
  • The selected font commands will continue to be used throughout the ticket until different ones are specified.
  • The larger the font size, the fewer number of lines and columns available to work with.
  • The horizontal positioning is based on inches from the left side of the page.
  • The vertical positioning is based on inches from the top of the page