4D v16.3

SET PRINTABLE MARGIN

Home

 
4D v16.3
SET PRINTABLE MARGIN

SET PRINTABLE MARGIN 


 

SET PRINTABLE MARGIN ( left ; top ; right ; bottom ) 
Parameter Type   Description
left  Longint in Left margin
top  Longint in Top margin
right  Longint in Right margin
bottom  Longint in Bottom margin

The SET PRINTABLE MARGIN command sets the values of various printing margins by using the Print form, PRINT SELECTION and PRINT RECORD commands.

You can pass one of the following values in 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.

The following example gets 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

The following example gets 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

 
PROPERTIES 

Product: 4D
Theme: Printing
Number: 710

 
HISTORY 

Created: 4D v6.8.1

 
ARTICLE USAGE

4D Language Reference ( 4D v16)
4D Language Reference ( 4D v16.1)
4D Language Reference ( 4D v16.2)
4D Language Reference ( 4D v16.3)