SET PRINTABLE MARGIN

4D - Documentation   Français   English   German   Spanish   4D v11 SQL, Command Theme List   4D v11 SQL, Command Alphabetical List   4D v11 SQL, Constant Theme List   Back   Previous   Next

version 6.8.1


SET PRINTABLE MARGIN (left; top; right; bottom)

ParameterTypeDescription
leftNumberLeft margin
topNumberTop margin
rightNumberRight margin
bottomNumberBottom margin

Description

The SET PRINTABLE MARGIN command enables you to set the values of various printing margins by using the Print form command.

You can pass one of the following values into the left, top, right and bottom parameters:

0 = use paper margins

-1 = use printer margins

value > 0 = margin in pixels (remember that 1 pixel in 72 dpi represents approximately 0.4 mm)

The values of the right and bottom parameters relate to the right and bottom edges of the paper respectively.

Note: For more information regarding Printing management and terminology in 4D, refer to the GET PRINTABLE MARGIN command description.

By default, 4D bases its printouts on the printer margins. Once the SET PRINTABLE MARGIN command is executed, the modified parameters are retained in the same process for the entire session.

Examples

1. The following example enables you to obtain the size of the dead margin:

   SET PRINTABLE MARGIN (-1;-1;-1;-1) `Sets the printer margin
   GET PRINTABLE MARGIN($l;$t;$r;$b)
      `$l, $t, $r and $b correspond to the dead margins of the sheet

2. The following example enables you to obtain the paper size:

   SET PRINTABLE MARGIN (0;0;0;0) `Sets the paper margin
   GET PRINTABLE AREA($height;$width) 
      `For size A4: $height=842 ; $width=595 pixels

See Also

GET PRINTABLE MARGIN, Get printed height, Print form.


4D - Documentation   Français   English   German   Spanish   4D v11 SQL, Command Theme List   4D v11 SQL, Command Alphabetical List   4D v11 SQL, Constant Theme List   Back   Previous   Next