AMT Datasouth 600 manual Example of How to Define Label Formats, 0.25 0.75 0 12 Name PrintBoldfont

Models: 600

1 89
Download 89 pages 34.83 Kb
Page 56
Image 56

Example of How to Define Label Formats

The example below shows how a label format can be defined as a PALTM procedure. This label format called Mailing_Label uses 5 variables. Notice how the variables are defined in reverse order compared to how this format is called. This format is defined in Pal_Procs_and_Formats.txt. Looking at this file will also reveal that this procedure makes use of the print utility procedures also defined in this file. Instead of using these print utilities, these formats could also use direct PALTM operators. This approach however allows label formats to be defined with very little knowledge of the PALTM Print and Program Language. In this label format the procedures Printfont, PrintBoldfont, and Printbarcode are used. These are not native PALTM operators but new procedures also defined in this file. Using print utility procedures like this in the label format makes it easy to define formats using inches as the measurement system with very little knowledge of PALTM operators.

The procedure below defines a label format called Mailing_Label. This name is case sensitive. The first 5 lines after the { character assign the passed parameters to names. These names are in turn used when needed to pass information to PALTM operators or in this case other PALTM procedures. When the label format is called, the very first parameter specified will be the name. Notice in the definition below that the Name variable is actually the last defined. This is due to the stack based nature of PALTM. The first defined parameter on the stack is the last off the stack (just like a stack of plates for example, last one stacked is first one off). The line below shows that at an X,Y position of 0.25", 0.75", the name variable will be printed in bold at a size of 12 points with no rotation. This PrintBoldfont procedure makes it easy to place text of any size and rotation at any position just by specifying the parameters in correct order then calling the PrintBoldfont.

0.25 0.75 0 12 Name PrintBoldfont

If should also be noted that the label format defined below is actually just another PALTM procedure definition just like the PrintBoldfont. Parameters are passed to these procedures in the same way. The big difference is that the PALTM operator showpage is included in the label format procedure, which will actually cause a label to be printed each time this format is called.

%===============================================================================

%

Mailing_Label procedure definition

 

 

 

%

Usage: Name

Street

CityState

Zip5

Zip4 Mailing_Label

%Example: (John Doe) (1234 Main St.) (Anytown, NC) (12345) (1234) Mailing_Label %=============================================================================== /Mailing_Label

{

/Zip4 exch def /Zip5 exch def /CityState exch def /Street exch def /Name exch def

0.250.75 0 12 Name PrintBoldfont

0.250.55 0 12 Street Printfont

0.250.35 0 12 CityState ( ) concat Zip5 concat (-) concat Zip4 concat Printfont

0.1 0.1 0 0.1 Zip4 Zip5 concat /Postnet Printbarcode

showpage

} bind def

Fastmark 600 Series User's Guide

56

Page 56
Image 56
AMT Datasouth 600 manual Example of How to Define Label Formats, 0.25 0.75 0 12 Name PrintBoldfont