PRINT CONTROL FORMS SYNTAX

INTRODUCTION


This section details the page description functions that are available to Print Control Forms, their syntax and a simple example. All functions described are device independent, except where noted, and will produce identical results on the selected output device driver. Exceptions to this are noted in the following table which summarises all the functions;

Function Syntax

All functions use the syntactical structure of the PI language. For a full description of the PI syntax, refer to the PI Programmers Reference manual.

 
Function Description
barcode Draw a barode
box Draw a rectangular box
dline/vline Draw a dotted line
doublebox Draw a box with double lines
fill Fill a rectangular area with a shaded grey scale pattern
fillbox Draw a rectagular box filled with a shaded pattern
font Select a font by typeface, size and style
ftext Place a formatted text paragraph on the page
graphic Place a bitmap graphic on the page
hor Draw a solid horizontal line
include Include the syntax from another source file
ital Select the italic style of the current font
landscape Select landscape orientation for the current page
literal Send a literal command to the output device
macro Select a PCL macro in a printer.
manual Select manual or automatic paper feed in a PCL printer
newpage Skip to a new page
ntext Place text on the next line using the current font and style
offset Apply an offest to all following vector positions
oinclude Include the syntax from another form with an offset
pcl Send a precompiled PCL form to a printer
portrait Select portrait orientation for the current page
pos Position the current cursor on the page
reset Reset a PCL printer
shadebox Draw a box with a shadow outline
text Place text on the page in the current font and style
tickbox Place a small tick box on the page
tickname Place a labelled tick box on the page
tray Select a paper tray on a PCL printer
upri Select the upright style of the current font
vert Draw a solid vertical line on the page


In brief, all functions require a list of comma separated arguments as shown in the function syntax. Optional arguments are shown surrounded in square brackets. The arguments are passed within a pair of brackets following the function name. These constitute an expression in the PI language and all expressions are closed with a semi-colon.

All function arguments will either be numeric or alphanumeric strings. All string aruments are shown on bold face in the function syntax. e.g.

 
ftext([fmt, ]x, y, length, string);
Arguments fmt and string are strings, while x, y and length are numeric. String constants are always passed withing quotation marks. Numeric arguments may be either floating point or integer values.

Function Names

All function names are case sensitive.

Dimension Values

All dimension values are in millimetres (mm) and can include decimal places.

In-line Unix Command Substitution

Any text contained within grave accents is considered to be a Unix command. This can be used anywhere within PI syntax. The following is an example;

text(10, 10, "The current date is : `date +%d/%m/%y`");
When used in this way all control codes, including newline are converted to a space and the result included in a single line.

If only one grave accent is used on a line then it will be treated literately. If it is desired to enclose text in grave accents then they should be preceded with a backslash ( \ ). eg.

"This is an \`example\` of text enclosed in grave accents."
Environment Variable Substitution

Environment variable substitution mimics the shell syntax, whereby string preceded by a dollar '$' symbol will be substituted by an environment variable if it exists.

Environment variable substitution allows the use of the following


barcode

 
barcode(data, std, x, y, [w, [h, [a ]]]);
Draws a barcode with the bottom left corner at locagtion x, y. The barcode is encoded using the data string, and using the method std. The following meathods are supported;
 
Allowable values for std Barcode Standard
"ean", "ean13", "ean-13", "ean8", "ean-8" EAN13 or EAN8
"upc", "upc-a", "upc-e" UPC
"isbn" ISBN
"39", "code39" Code 3 of 9
"128c", "code128c", "128b", "code128b", "128", "code128", "128raw" Code 128
"i25", "interleaved 2 of 5" Interleaved 2 of 5
"cbr", "codabar" Codabar
"msi" MSI
"pls", "plessey" Plessey

The following modifiers may be applied to the standard by appending std with the following strings;

Optional arguments are w for width and h for height, and a for angle. The barcode may be rotated in increments of 90 degrees.

Example;

barcode("931234567890", "ean13",  20, 30, 30, 15);
barcode("012345", "39",   20, 60);
barcode("012345", "code128/t", 20, 75, 20, 10);


This will create three barcodes. The first will be and EAN13 barcode located 20 mm from the left margin and 30 mm from the top of the page. The second barcode uses 3 of 9 encoding.. The third uses code 128 encoding, but the text encoding is not shown due to the "/t" modifier which is appended to the standard.

Click on this image to view the print control source


box

 
box(x, y, w, h, t);
Draws a box with the top left corner located at position x, y. The box is w wide, h high and uses a line thickness of t.

Example

box(10, 20, 30, 40, 0.4);
Draws a box with the top left-hand corner located at 10,20. The box is 30mm long and 40 mm high with a wall thickness of 0.4mm.
 

Click on this image to view the print control source


check


Report Writer Only

check on
check off

Used in the Report Writer to manually initiate a check to see if the
record has exceeded the lowest Y dimension on the page, as defined
with the constant Page_End.

Normally the report writer checks the value of _max_Y against Page_End
to see if it is necessary to go to a new page. However in the instance
where the record is a composite of several records it may be desirable
to nominate when the check is done.

Example

The following data file requires 3 record types. The first places the
heading text, next is a variable number of numerical records, this is
followed by some footer text.

In this example a single record is actually made up of three records
so the check is turned off in the first record and turned on again
when processing on the third record is completed. This will result in
the Report Writer only forcing a new page after it has processed all
three records.

Data file;
.RE R.record-1
This is the heading
.RE R.record-2
123,456,778
124,457,789
125,458,759
126,459,749
.RE R.record-3
This is the end text

Template;
#record-1
check off
text 10 y_dim "%s"
let y_dim y_dim+8
))
#record-2
text d 20 y_dim "%s"
text n "%s"
text n "%s"
let y_dim y_dim+5
))
#record-3
let y_dim y_dim+3
text 10 y_dim "%s"
check on
))


conditional


Report Writer Only

Used in the Report Writer to indicate that the record is to be only
output if data substitution has taken place. The statement must be
the first statement in the record and can only be preceeded by a
separators statement.

Example

Consider the following two data records, each contains three items per
record with the data items delimited with a ",".

Data file 1 Data file 2

123,456,789 123,456,789
5543,5765,5987 , ,
9873,9867,9576 8735,8675,5765
 

The following record is an extract from a tempate file. In this
example _start has been initially defined as 1.

#record
separators ","
conditional
constant %.0f _start
text 22 _start "Record _start: = %s"
text 66 "%s"
text 88 "%s"
let _start _start+5
))

Output using the first data file would be;

Record 1: 123 456 789
Record 2: 5543 5765 5987
Record 3: 9873 9867 9576

Output using the second data file would be;

Record 1: 123 456 789
Record 2: 8735 8675 5765

If the conditional statement was not used then the output using the
second data file would be.

Record 1: 123 456 789
Record 2:
Record 3: 8735 8675 5765
constant

constant string value
constant string "string of text"
 

All occurrences of string are replaced with value in the remainder of
the input file.

If the value is a string of text then they must be enclosed in
quotes.

The following makeform extract demonstrates the use of constant to
substitute a string.

let x_dist 20
let y_dist 30
constant suburb Wantirna
text x_dist y_dist "suburb"
results in:
 
 


dline

 
dline(x, y, l);
vline(x, y, l);
Draws a dotted line starting at x, y with a length of l. dline will draw a horizontal line. vline will draw a vertical line. These functions are typically used to draw tear-off or signature lines on forms.

Example

dline(20, 30, 50);
Draws a dotted line starting at at 20,30. The line is 50mm long.
 

Click on this image to view the print control source


doublebox

 
doublebox(x, y, w, h, t);
Draws a box with the top left corner at x, y. The box is w wide, h high and uses a line thickness of t and a inner frame line. The inner frame has thickness t/2 and is spaced t in from the outer box.

Example

doublebox(10, 20, 30, 40, 0.4);
Draws a box with the top left-hand corner located at 10,20. The box is 30mm long and 40 mm high with a wall thickness of 0.4mm. The inner line thickness is 0.2mm.
 

Click on this image to view the print control source


fill

 
fill(x, y, w, h, shade);
Fills a rectangular area with top lefthand corner at x, y and width of w and height h with a shade. The shade argument is given as a percentage from 0 to 100.
Example;
fill(20, 50, 100, 200, 30);
Creates a fill pattern of 30% grey, 100mm wide and 200mm high with the top left hand corner 20mm from the left hand margin and 50mm from the top margin.
 

Click on this image to view the print control source


fillbox

 
fillbox(x, y, w, h, t, p);
Draws a filled box with the top left corner at x, y. The box is w wide, h high and uses the line thickness t. The box is filled with a pattern p (refer to the
fill command for details of available fill patterns).

Example

fillbox(10, 20, 30, 40, 0.4, 10);
Draws a box with the top left-hand corner located at 20,10. The box is 30mm long, 40mm heigh with a wall thickness of 0.4mm. The box is filled with a 10% grey scale pattern.
 

Click on this image to view the print control source


 


font

 
font(typeface, size, weight[, style]);
All arguments to the font function are numeric, being the size in points (a typesetting dimension, with 72 points to the inch) or characters per inch, the weight of the characters; ie -3 equals light, 0 equals normal, 3 equals bold or heavy, and optionally style; 1 equals italic, 0 equals upright.

For portability between PCL, PDF and any of the other device drivers supported by Print Control, only "Times Roman", "Helvetica", "Line Printer" and "Courier" typefaces are supported. The typeface values for these suuported fonts are;
 
Typeface (spacing) Value
Courier (fixed pitch) 3
Line Printer (fixed pitch) 0
Times Roman (proportional) 5
Helvetica (proportional) 52

Note that for fixed pitch fonts, the size is nominated in characters per inch, while most other typefaces are proportional fonts and the size is nominated in "points".
 
Weigth/Style Value
Normal 0
Upright 0
Italic 1
Bold 3

When using the PCL driver, typeface can be any one of the fonts values defined below or the value of the typeface as defined in the HP LaserJet Technical reference manual;

  • optima 17
  • omega 17 4113
  • humanist (Zaph Humanist) 17
  • ITC garamond 18
  • cooper_black 46 4142
  • coronet_bold 20
  • broadway 21
  • bauer_bodoni 22
  • centry_schoolbook 23 4119
  • university_roman 24 4120
  • helv_open 25
  • ITC_avant_garde 31 4127
  • brush 32 4128
  • univers (Helvetica) 52 4148
  • bodoni 53 4147
  • park_avenue 59 4155
  • dom_casual 61 4157
  • ITC_lubalin_graph 78 4174
  • revue 97 4193
  • garamond_ antiqua 101 4197
  • PCL Weights selectable are:
  • ultra_thin (-7) semi_bold 1
  • extra_thin (-6) demi_bold 2
  • thin (-5) bold 3
  • extra_light (-4) extra_bold 4
  • light (-3) black 5
  • demi_light (-2) heavy 5
  • semi_light (-1) extra_black 6
  • norm 0 ultra_black 7
  • normal 0
  • medium 0
  • book 0
  • text 0
  • PCL Styles selectable are:
  • upright 0
  • solid 0
  • italic 1
  • condensed 4
  • condensed_italic 5
  • compressed 8
  • extra_condensed 8
  • expanded 24
  • outline 32
  • inline 64
  • shadowed 128
  • outline_shadowed 160
  • Example
    font( times,  14,  bold);
    text( 40,    100,  "Times Roman 14 point Bold");

    font( helv,   10,  medium);
    text( 40,    110,  "Univers 10 point Medium");

    font( helv,   14,  bold);
    text( 40,    120,  "Univers 14 point Bold");

    font( courier,12,  normal);
    text( 40,    130,  "Courier fixed pitch 12 point (10 pitch)");

    Click on this image to view the print control source


    ftext

     
    ftext([fmt, ]x, y, length, string);
    ftext works in a similar way to text, but is intended to format blocks of text. The fmt parameter may be either "r" or "j" for raggged right margin or fully justified right margin. Parameters x and y nominate the starting postion, length nominates the width of the formated block.

    Example;

    timesroman = 5;
    medium = 0;
    normal = 0;
    italic = 1;
    bold = 3;

    font( 5, 8,  normal, italic);
    hor(  18, 10, 54, 0.1);
    vert( 20, 8,  18, 0.1, 2, 50);
    text( 45, 9, "c", "50mm");
    font( 3, 12, normal);
    text( 20, 5, "r", "ftext(\"r\",70,14,50,\"string\");");
    font( 5, 10, normal);
    ftext( "r", 20, 14, 50, "This is a string showing how text is formatted into a block and aligned to the right margin");

    offset( 80, 0);
    font( 5, 8,  normal, italic);
    hor(  18, 10, 54, 0.1);
    vert( 20, 8,  18, 0.1, 2, 50);
    text( 45, 9, "c", "50mm");
    font( 3, 12, normal);
    text( 20, 5, "r", "ftext(\"j\",20,14,50,\"string\");");
    font( 5, 10, normal);
    ftext( "j", 20, 14, 50, "This is a string showing how text is formatted into a block and aligned to the right margin");

    Click on this image to view the print control source


    gloss


    gloss x y glossary_name entry [ x_offset y_offset n ]

    Allows the inclusion of an entry of forms syntax from a glossary.

    Provides exacly the same facilities as the oinclude command except
    that the included syntax is taken from a glossary.

    3 optional parameters can be applied to include the same file more
    than once.

    These are x_offset which is the offset in mm from x where the next
    form will be placed, y_offset which is the offset in mm from y where
    the next form will be placed and n which is the number of times the
    image is included and offset. Usually either x_offset or y_offset
    is zero.

    Also refer to the oinclude command.

    gloss 20 10 glossary test 0 20 3

    The entry test will be extracted from the glossary gloss. gloss will
    be assumed to be in $Utools/Utools/macros/source because no full
    pathname has been given. The example below defines a box starting at
    0,0 and 20mm wide and 8mm high and 0.5mm thick (ie. box
    0,0,20,10,0.5). The entry test will be included 3 times, the first
    time 20mm from the left margin and 10 mm from the top page, the each
    subsequent time being offset down 20mm.
     
     
     
     


    graphic

     
    graphic([x, [y, ]] [pathname/]filename);
    Allows the inclusion of raster graphics or scanned files (or any other file for that matter). Ideal for the inclusion of logos.

    Positional arguments x and y are optional, if no pathname is specified then the filename is assumed to be in $Utools/Utools/macros/rastered.

    Separate rastered images are required depending upon which mode that Print Control Forms or Report Writer is operating in. These separate files are stored with the same file name but different extensions according to the following table;
     
    Mode filename extension (file type)
    PCL (HP Laserjet) .pcl (Laserjet PCL TIFF encoding)
    PDF (Adobe Acrobat) .t4 (Group 3 T4 encoding)
    ZPL (Zebra Programming Language) .grf (Proprietary ZPL encoding)
    CSI (Cognitive Systems) .pcx (PC paint encoding)

    Example;

    pos(10, 10)
    graphic("/usr/Utools/macros/rastered/id-logo-20x20");
    or
    graphic("10, 10, "id-logo-20x20");
    Adds a logo at location 10, 10. The logo is a rastered file called "id-logo-20x20"
     

    Click on this image to view the print control source


    hor

     
    hor(x, y, l, t[, n, s]);
    Draws a horizontal line from x, y of length l and thickness t. The optional parameters are n, the number of lines required and s, the spacing between lines in the vertical plane.

    Example

    hor(10, 10, 80, 0.4);
    Horizontal line 0.4mm thick with top at 10,10 extending across 80 mm.
    hor(10, 10, 80, 0.4, 4, 5);
    Draws 4 horizontal lines 0.4mm thick with the top at 10,10 extending across 80 mm, 5mm apart.
     

    Click on this image to view the print control source


    if


    Primarily for use in the Laser Report Writer but can be used in
    a form

    if (test) syntax

    or

    if (test)
    {
    syntax
    }
    else
    {
    syntax
    }

    Used in Laser report Writer templates to output any valid Makeforms
    syntax if the condition is true.

    The test condition must be enclosed in braces "()" and can include the
    4 basic maths operators plus <, > &, | and %. The following are all
    valid if statements.

    if (10) text 0 0 " 10 "
    if (3 = 3) text 0 0 " 3 is equal to 3 "
    if (3+4 > 6) text 0 0 " 7 is greater than 6 "
    if (3 < 6) text 0 0 " 3 is less than 6 "
    if (2<4 & 1<3) text 0 0 " 2 less than 4 and 1 less than 3 "
    if (2<4 | 1<3) text 0 0 " 2 less than 4 or 1 less than 3 "
    if ( 4 % _Line ) text 0 0 "modulo comparison"
    if (_Line > 4.1) let _Line=99

    if (3+(4*4.55) > 6)
    {
    text 0 0 " 21.2 > 6 "
    text 0 0 "This demonstrates a multiline if statement"
    }

    if (3+(4*4.55) > 6)
    {
    text 0 0 " 21.2 > 6 "
    text 0 0 "This demonstrates a multiline if statement"
    }
    else
    {
    text 0 0 "This is the optional else syntax"
    }


    ignore


    Laser Report Writer only

    Used in Laser report Writer templates to ignore a data item. Usage is;

    ignore %s

    This syntax is provided to accomodate the situation where a line of
    data being processed is to be ignored. This may be the case is the
    same data file is being used by different templates.

    Another form of ignore is used when a capital S is used with a
    statement.
    eg text 10 10 "%S"

    In this case the statement is only output if there is data to be
    substituted.
     

    Also See

    conditional


    include

     
    include([pathname/]filename);
    Allows the inclusion of another form in the current form.

    This is a powerful facility allowing the production of a form or macro by combining a number of other forms. The include command could be used as follows:

    1. Produce a makeform file containing the company logo, address and phone numbers.
    2. Include this file in other company forms (eg fax, memo, things to do) so that all the forms are consistant and if there is any change required, eg phone number, it will apply to all forms.
    The offset command can be used to adjust the position of the included form if necessary. Also refer to oinclude.

    If no pathname is specified then the filename is assumed to be in the current directory.

    Example;
    timesroman = 5;
    bold = 3;
    include("MFG018.mf.txt" target="source");
    offset(0, 35);
    include("MFG018.mf.txt" target="source");
    font(timesroman, 14, bold);
    text( 75, 132,  "MEMORANDUM");

    Click on this image to view the print control source


    ital

     
    ital();
    Select the upright style of the current font.

    Example;

    timesroman = 5;
    medium = 0;
    hor(30, 120, 100, 1);
    vert(30, 120, 50, 1);
    font(timesroman, 12, medium);
    text(40, 130, "Times Roman 12 point Medium");
    ital();
    text(40, 140, "Times Roman 12 point Italic");
     

    Click on this image to view the print control source


    keep


    keep (or keep cursor)

    keeps the current position of the cursor to allow easy overlaying
    of subsequent text over the resulting form. This is normally used
    in forms included at any position in the document. Keep is not
    required in macros (this is implied in a macro).

    Example:

    The following form and text could have been produced as follows:
    $FORM:keep_demo
    Demo of text overlay

    where keep_demo is

    . KEEP_DEMO form
    relative
    keep
    box 20, 0, 42, 6.2, 0.5
     
     
     
     
     
     


    landscape

     
    landscape();
    Define a form using landscape coordinates and fonts.

    You cannot change between landscape and portrait within the same form page. The page orientation should only be set at the start of a form or in a report header.
     

    Click on this image to view the print control source


    let


    let variable value
    let variable formula

    Used to define and calculate numeric variables.

    Any dimension applied to makeforms syntax can be a mathematical
    equation. let is used to set or recalculate values.

    Examples

    let start=90
    text 10 start "This is text"
    let start start+5
    text 10 start "This is more text"

    The following extract from a Report Writer template shows how a value
    calculated with a let statement is formatted for output.

    let val1 %s
    let val2 %s
    let val3 (val1+val2)
    let %6.2f val3
    text d 22 44 "val3"

    A more sophisticated use is to use the pre-defined constants when
    calculating the position of the next text location. Consider the
    situation where a description is formatted into a block of text and
    the next block of text is to start 8mm below the last line of
    the first block of text.

    ftext r 10 10 50 "This is the description of the first item to be
    formatted"
    let start=_max_Y+8
    ftext r 10 start 50 "This is the description of the second item to be
    formatted"
     
     
     


    literal

     
    literal(seq);
    Pass the string directly to the printer. Used where a function required is not directly provided in the Print Control by the syntax. Note that this will make any foms or reports device dependent.

    Non printable characters are defined using standard control character notation of the PI language, which is identical to Unix shell and C. i.e. A carat ('^') precedes control modified characters in the range ^@ to ^_ representing decimal 0 to 31, and a backslash escapes octal codes and other special characters.

    Examples;

    To set the current font to fixed pitch courier using PCL escape sequences;.

    literal("\033(s0p12.00h10.0v0s0b3T");
    To produce white on black text using PCL escape sequences;
    box(130, 48, 57, 13, 0.2);
    vert(151, 48, 13, 0.2);
    vert(163, 48, 13, 0.2);
    fill(130, 48, 57, 4, 100);

    literal("\033*v1o0n100gv1T");
    font(52, 8, 0);
    text(140, 51, "c", "Date");
    text(157, 51, "c", "Page");
    text(175, 51, "c", "Invoice No.");
    literal("\033*v0o0n0gv0T");
     

    Click on this image to view the print control source


    macro

     
    macro(n);
    Calls a PCL macro number n. This function is used exclusivley with PCL printers to recall a stored PCL macro.


    manual

     
    manual(switch);
    The switch will either be "on" of "off" to turn on or off manual feed mode. This function is specific to PCL printers.

    Used to put a PCL printer into manual feed mode. When this command is issued the printer Manual indicator will light, and the printer will wait for a page to be inserted into the manual feed tray before printing any data.


    newpage

     
    newpage();
    Causes a form feed, and commences definition of a new page in a form or report.


    ntext

     
    ntext(string);
    Place the string in the current font at the location defined by the previous text command incremented down by the value of the last space command times the size of the current font.

    ntext allows the easy preparation of text as it adopts all of the attributes of the previous full text or ftext syntax statement.

    The x location is assumed to be the same as the last text command (or 0 if no previous text or ntext command used).

    The y value is the y value of the last text, ftext or ntext command plus a value calculated from the current text size (point value).

    Example

    Refer to text command.


    offset

     
    offset(x, y);
    Offset specifies the x and y offset applied to the x and y values used in the remainder of the input file. The offset command is cummulative and negative values are valid, allowing easy use of multiple offset commands in a form.

    This command is useful in achieving the final positioning of the form or parts of a complex form on the page rather than changing all x,y co-ordinates. It is also useful when including other forms.

    Offset(0, 0) clears all previous offset values and returns any following co-ordinates to their absolute values.

    Example

    offset(10, 0);
    Moves the output to the right by 10mm
     

    Click on this image to view the print control source


    oinclude

     
    oinclude(x, y, [pathname/]filename[, x_offset, y_offset, n]);
    Allows the inclusion of another form in the current form.

    Provides exacly the same facilities as the include command except that the included syntax will be offset by the values x and y.

    Three optional parameters can be applied to include the same file more than once. These are x_offset which is the offset in mm from x where the next form will be placed, y_offset which is the offset in mm from y where the next form will be placed and n which is the number of times the image is included and offset.

    Also refer to the include command. If no pathname is specified then the filename is assumed to be in the current directory.

    Example;

    The file "test" used in the example below defines a box starting at 0, 0 and 20mm wide and 8mm high and 0.5mm thick (ie. box 0,0,20,10,0.5). The file test will be included 3 times, the first time 20mm from theleft margin and 10 mm from the top page, the each subsequent timebeing offset down 10mm.

    oinclude(20, 10, "test", 0, 20, 3);

    Click on this image to view the print control source


     


    pcl

     
    pcl([pathname/]filename);
    Allows the inclusion of precompiled PCL files. Ideal for the inclusion of pre-compiled PCL syntax if the compile time of the form is to be minimised. Often used in the Print Control Report Writer to minimise processing time if there is a lot of syntax that does not alter such as a form overlay.

    If no pathname is specified then the file is is assummed to be located in $Utools/Utools/macros/pcl.


    portrait

     
    portrait();
    Define a form using portrait coordinates and fonts.

    You cannot change between landscape and portrait within the same form page. The page orientation should only be set at the start of a form or in a report header.
     

    Click on this image to view the print control source


    pos

     
    pos(x, y);
    Locates the cursor at position x, y. Used for locating the cursor before merging a graphic image with the graphics command and to set the cursor position at the end of a form macro.

    NOTE: At the end of a form definition the cursor should be repositioned where text is to start. The cursor y position is the only important value at the end of the macro definition, the x value is set to the left hand margin.

    Example;

    pos(20, 30);
    This will position the cursor 20 mm from the left hand margin and 30 mm from the top margin.

    Click on this image to view the print control source


    rela


    Select RELAtive addressing for the y axis rather than absolute which
    is the default. Used for forms to be included at any point in a
    document. For example with the $FORM command from a Uniplex
    document.
     

    Example

    To include a thick line at any point in a document a form could be
    defined as shown below:

    . Thick line demo form, t_line
    . 1.5mm line starting 18mm from margin and 1mm below $FORM
    relative
    hor 19, 4, 114, 1.5
    . end form

    The line below was inserted using $FORM:t_line
     
     
     
     

    So was this next one
     
     
     
     
     

    This can be used to provide a floating header or footer in a document,
    rather than the fixed header (top of page) provided by most
    wordprocessors.

    This is also used where the $PCL statement is used to include a file
    of PCL code. The first statement in the syntax listing is the
    relative statement. The file is then built using the Build a PCL File
    option on the Build Forms menu.
     
     


    reset

     
    reset();
    Send a PCL Printer Reset command to the printer (Esc E). This restores the default environment to the printer and deletes all temporary fonts and macros. It will also print any partial pages of data which have been received by the printer.


    separators


    Laser Report Writer only

    Used in Laser Report Writer templates to specify what is to be
    considered a valid record specifier on the data input stream.

    Syntax is separators followed by valid separators enclosed in quotes.

    An example of its use is detailed as part of Example 3 in the Worked
    Examples section of this manual.

    To alter a separators definition then it is restated.

    To cancel all separators then separators is used without any
    options.

    Example

    Specify a tab and "," as separators

    separators "\t,"

    Specify separators as being "," at the start of a Report Writer
    template and cancel it at the end of the record.

    #record
    separators ","
    font 5 10 normal
    text d 93 start_ps "%s"
    text d 110 start_ps "%s"
    text d 125 start_ps "%s"
    text d 148 start_ps "%s"
    text d 165 start_ps "%s"
    let start_ps start_ps+5
    separators
    ))


    shadebox

     
    shadebox(x, y, w, h, t[, d[, s[, pattern]]]);
    Draws a box (as per the box command) starting at x, y. The box is w wide, h high and uses the line thickness of t. Optional parameters are d for the depth of shading, s for the side to be shaded (either top "T" or bottom "B". "B" is the default value.) and p for the pattern (any pattern defined in fill can be used, a solid shade is the default.

    Example

    shadebox(10, 20, 30, 40, 0.4, 1.5, "B" ,100);
    Draws a box with the top left-hand corner located at 10, 20. The box is 30mm wide and 40 mm high with a wall thickness of 0.4mm. The depth of the shade is 1.5mm, the shade is on the bottom and it is a 100% fill (solid). Note: In this example neither "B" or 100 are required to be defined as they are the default values.
     

    Click on this image to view the print control source


    space


    space n

    The space command is used to adjust the distance between lines of text
    produced using the ntext command. The line spacing is a function of
    the text size (refer to the font command) and the value of n. Normal
    spacing is achieved with a value of 1.

    Doubling n will result in double line spacing.

    Valid values of n range from 0 to infinity, decimal places are
    significant to six digits.
     

    Example

    The following example forms show single line spacing and one and a
    half line spaced paragrahs.

    text 10,10 "This is the start of"
    ntext "a sample of text"
    ntext "at the normal or default line spacing"

    This is the start of
    a sample of text
    at the normal or default line spacing
     

    space 1.5
    text 10,10 "This is the start of"
    ntext "a sample of text"
    ntext "at 1.5 normal line spacing"

    This is the start of
    a sample of text
    at 1.5 normal line spacing


    stext


    stext x,y,size,set,symbol

    Used to place a symbol at the specified x,y location where;

    size is the point size of the font

    set is the symbol set to use, (refer to the symbol statement)

    symbol is the decimal value of the symbol.
     

    Example

    stext 20 50 8M 222

    selects decimal value 222 from the Math-8 symbol set and prints it at
    location 20mm from the left margin and 50mm from the top of the page.
    symbol

    symbol string

    Used to set the symbol set being used. Symbol sets are as defined in
    the LaserJet manual. Also refer to stext

    Examples

    symbol 0A Math-7
    symbol 0B HP Line Draw
    symbol 0N ECMA-94 Latin 1
    symbol 0U ASCII
    symbol 1U Legal
    symbol 4Q PC Line
    symbol 5M PS Math
    symbol 6M Ventura Math
    symbol 7J DeskTop
    symbol 8M Math-8
    symbol 8U Roman-8
    symbol 9U Windows
    symbol 9L Ventura ITC Zapf Dingbats 100
    symbol 10J PS Text
    symbol 10L PS ITC Zapf Dingbats 100
    symbol 10U PC8
    symbol 11L ITC Zapf Dingbats 100
    symbol 11U PC-8 DN Set
    symbol 12L ITC Zapf Dingbats 200
    symbol 12U PC-850
    symbol 13J Ventura International
    symbol 13L ITC Zapf Dingbats 300
    symbol 14J Ventura US
    symbol 15U Pi Font


    text

     
    text([x, [y, [fmt, [width, ]]]] string);
    If no parameters are found before the string, then the current alignment style will be used, with the starting x and y taken as the last x and y value of the preceding text statement. (Using predefined constants Y_bot and X_right).

    If only one parameter is found before the string then this is interpreted as x, and y is taken as Y_bot, and the statement adopts all of the attributes of the previous full text or ftext command. eg.

    font(times, 10, bold);
    text(12, 20, "Note: ");
    font(times, 10, medium);
    text("this is a string.");
    text(80, "This is another string.");
    would appear as:
    Note: this is a string.                                            This is another string.
    The fmt argument defines the alignment of the string around the nominted x, y location. It may be one of;
  • "r" Ragged right margin. The string is left aligned to the x position.
  • "a" Algined. The string is right aligned to the x position
  • "c" Centred. The string is centred aroung the x position.
  • "d" Decimal. The string is interpreted as a decimal number and the radix character (decimal point) is aligned to the x position.
  • "j" Justified. The string will be fully justified into a paragraph which is left aligned to position x width width.
  • The individual syntax is;
    text(x, y, "a", "right aligned string");
    text(x, y, "j", width, "a fully justifed string");
    text(x, y, "r", "a left aligned string (ragged right margin)");
    text(x, y, "c", "a centred string");
    text(x, y, "d", "a decimal string");
    Beware of the effects of the text statement adopting attributes of  the previous statement if options are undeclared. In the following example the third and fourth text statements will centre text because the alignment parameter is not defined.
    text(10, 10, "r", "string");
    text(10, 20, "c", "string");
    text(10, 30, "string");
    text(10, 40, "string");
    Whereas in this example the third and fourth text statements will have a ragged right margin.
    text(10, 10, "r", "string");
    text(10, 20, "c", "string");
    text(10, 30, "r", "string");
    text(10, 40, "string");
    Examples;
     

    Click on this image to view the print control source


    tickbox

     
    tickbox(x, y);
    Places a 3mm square tickbox on the form. The bottom left hand corner of the tickbox is at location x, y. This allows easy alignment with text. This is useful for areas which must be manually ticked by the user.

    Example

    tickbox(10, 20);
    Places the bottom lefthand corner of the tickbox at 10,20.
     

    Click on this image to view the print control source


    tickname

     
    tickname(x, y, string);
    As for tickbox but also includes a text string located 4mm from the tickbox in the current font.

    Example
     

    tickname(10, 20, "Mailed");

    Click on this image to view the print control source


    tray1, tray2

     
    tray(n);
    tray1();
    tray2();
    This selects the nominated paper tray n on a PCL printer.


    upri

     
    upri();
    Select the upright style of the current font.

    Example;

    timesroman = 5;
    medium = 0;
    hor(30, 120, 100, 1);
    vert(30, 120, 50, 1);
    font(timesroman, 12, medium);
    ital();
    text(40, 130, "Times Roman 12 point Italic");
    upri();
    text(40, 140, "Times Roman 12 point Medium");
     

    Click on this image to view the print control source


    vert

     
    vert(x, y, l, t[, n, s]);
    Draws a vertical line from x, y of length l and thickness t. The optional parameters are n, the number of lines required and s, the spacing between lines in the horizontal plane.

    Example

    Vertical line 1mm thick with top at 10, 20 extending down 20 mm.

    vert(10, 10, 20, 0.3);

    Click on this image to view the print control source


    Draws 8 vertical lines 1mm thick with top at 10, 20 extending down 20 mm, and 10mm apart.
     

    vert(10, 10, 20, 0.3, 8, 10);

    Click on this image to view the print control source


    while


    Primarily for use in the Laser Report Writer but can be used in
    a form

    while (test)
    {
    syntax
    }

    Used to output any valid Makeforms syntax if the condition is true.

    The test condition must be enclosed in braces "()" and can include the
    4 basic maths operators plus <, > &, | and %. The following are all
    valid while test conditions.

    while (3 = 3) 3 is equal to 3
    while (3+4 > 6) 7 is greater than 6
    while (3 < 6) 3 is less than 6
    while (2<4 & 1<3) 2 less than 4 and 1 less than 3
    while (2<4 | 1<3) 2 less than 4 or 1 less than 3
     

    The following are examples of valid while statements.

    let _counter 1
    while (_counter < 10)
    {
    text 0 _counter*5 "Text for count : _counter"
    let _counter _counter+1
    }
     

    A while loop can contain if statements. The following while loop
    contains two valid if statements.

    let _counter 1
    while (_counter < 10)
    {
    text 0 _counter*5 "Text for count : _counter"
    œ if (_counter = 5) text 5 _counter*5 "count =5"
    let _counter _counter+1
    œ if (_counter = 7)
    {
    text 10 10 "Counter is = 7"
    }
    }