Templates

Frames

To specify the size and position of information drawn on a page many keywords require four values that represent the coordinates of a rectangular frame. The frame is a way of specifying where drawing occurs. The frame itself is not drawn, but it is a bounding area that contains whatever is drawn with a keyword.

For example with the /text/ keyword, the text is drawn inside the area of the frame, and the frame itself is invisible. With the /rectangle/ keyword the frame itself becomes the position of the drawn lines.

In a keyword, the frame is represented by:

<left>,<top>,<right>,<bottom>

The left and top values specify the top left corner, and right and bottom the bottom right corner of the frame.

The values are numbers that specify in units of tenths of a millimetre the position. With 0,0 at the top left corner of a page, and 2100,2970 at the bottom right corner of an A4 page.

When specifying the coordinates of a frame remember that the values are tenths of a millimetre. So:

10 is 1 mm

100 is 10 mm (or 1 cm)

1000 is 100 mm (or 10 cm)

Using values that are not multiples of ten is allowed, for example, 105 is 10.5 millimetres.

Most printers have a margin around the edge of a page that cannot be printed on. This means that on an A4 page if a frame is specified that goes to the edge of a page, when printing the frame may be truncated. Generally, is recommended that report templates be designed not to use an area of 10 mm around the edge of a page.

 

Contents
Search