beautypg.com

Execform – AMT Datasouth PAL User Manual

Page 102

background image

execform

96

/

FormName

Proc {

...form drawing instructions...

} bind def

/

FormName

Dict <<

/FormType 1

/BBox [

Left

Bottom

Right

Top

]

/Matrix [1 0 0 1 0 0]

/PaintProc {

FormName

Proc}

>> def

FormName

Dict 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 FormName

Proc

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 FormName

Dict

, the

/PaintProc

entry has been simplified to

execute the separate procedure FormName

Proc

. 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 "FormName

Dict execform

". The first time PAL encounters the operation

FormName

Dict

will not yet contain a form image, so PAL will execute

/PaintProc

which in

turn will execute

/

FormName

Proc

. PAL will then capture the form image and save it as part of

FormName

Dict

. For all subsequent executions of "FormName

Dict execform

" PAL will

simply use the form image already contained within FormName

Dict

.

The user must be careful not to redefine FormName

Dict

once it has been defined. If the user

redefines FormName

Dict

, any form image contained within FormName

Dict

will be lost and

PAL will have to recreate it during the next

execform

operation involving that dictionary.

Therefore, the definition of FormName

Dict

as well as FormName

Proc

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 FormName

Dict

and

any form image it contains. This can release a significant amount of memory when larger form
images are involved.