Manual

execform
96
/FormNameProc {
...form drawing instructions...
} bind def
/FormNameDict <<
/FormType 1
/BBox [Left Bottom Right Top]
/Matrix [1 0 0 1 0 0]
/PaintProc {FormNameProc}
>> def
FormNameDict execform
First, the user should select some name for the form. This name should replace FormName in the
above template. This will result in the definition of a procedure under the selected form name with
Proc appended to the end of the form name. It will also result in the definition of a dictionary to
contain the form image under the user's selected form name with Dict appended to the end of the
form name.
The definition of the FormNameProc contains the operations necessary to render the form image
onto the page. These operations are indicated by "...form drawing instructions..." in the template.
Left, Bottom, Right, and Top in the template specify the area on the page in which the form is to
be drawn. These values are specified using the current coordinate system. Since PAL defaults to
typesetter points for the coordinate system, these values should be specified in typesetter points
unless the user has altered the coordinate system.
Within the form dictionary FormNameDict, the /PaintProc entry has been simplified to
execute the separate procedure FormNameProc. This allows the user to define a large series of
drawing operations outside the definition of the form dictionary.
Whenever the user wishes to render the form onto the page, the user simply needs to specify the
operation "FormNameDict execform". The first time PAL encounters the operation
FormNameDict will not yet contain a form image, so PAL will execute /PaintProc which in
turn will execute /FormNameProc. PAL will then capture the form image and save it as part of
FormNameDict. For all subsequent executions of "FormNameDict execform" PAL will
simply use the form image already contained within FormNameDict.
The user must be careful not to redefine FormNameDict once it has been defined. If the user
redefines FormNameDict, any form image contained within FormNameDict will be lost and
PAL will have to recreate it during the next execform operation involving that dictionary.
Therefore, the definition of FormNameDict as well as FormNameProc should only occur as
part of a print job initialization sequence before the sequence of pages starts printing.
At the end of the print job, the user can use the
undef
operator to discard FormNameDict and
any form image it contains. This can release a significant amount of memory when larger form
images are involved.