ONLINE HELP
 WINDEVWEBDEV AND WINDEV MOBILE

This content has been translated automatically.  Click here  to view the French version.
Help / WLanguage / WLanguage functions / Standard functions / Print functions
  • When should I use iMargin?
  • Logical margins and physical margins
WINDEV
WindowsLinuxJavaReports and QueriesUser code (UMC)
WEBDEV
WindowsLinuxPHPWEBDEV - Browser code
WINDEV Mobile
AndroidAndroid Widget iPhone/iPadIOS WidgetApple WatchMac Catalyst
Others
Stored procedures
Defines the "logical" print margins. These margins are added to the physical margins in which nothing can be printed. Therefore, you cannot print inside the physical and logical margins.
Caution: This function cannot be used with the report editor.
Example
iMargin(20, 11, 20, 11)
// Connaître les marges physiques d'une imprimante
iMargin(0, 0, 0, 0)
MargeH = (HauteurPapier - iPageHeight())/2
MargeL = (LargeurPapier - iPageWidth())/2
Syntax
iMargin(<Top margin> , <Bottom margin> , <Left margin> , <Right margin>)
<Top margin>: Real
Margin of the top section of page, expressed in millimeters. This margin applies from the top side of the page. If this margin is smaller than the physical top margin, the physical top margin will apply.
<Bottom margin>: Real
Margin of the bottom section of page, expressed in millimeters. This margin will be applied from the bottom side of the page. If this margin is smaller than the physical bottom margin, the physical bottom margin will apply.
<Left margin>: Real
Margin of the left section of page, expressed in millimeters. This margin will be applied from the left side of the page. If this margin is smaller than the physical left margin, the physical left margin will apply.
<Right margin>: Real
Margin of the right section of page, expressed in millimeters. This margin applies from the right side of the page. If this margin is smaller than the physical right margin, the physical right margin will apply.
Remarks

When should I use iMargin?

  • iMargin must be called:
  • iEndPrinting cancels the margins.
  • In the same document, you can define margins multiple times with iMargin. For each print, the origin of the print will use the last defined margins.
  • iMargin must not be called in the processes of a report created with the report editor.

Logical margins and physical margins

  • By default, the logical margins are set to 0. The origin (0,0) is located in the upper-left corner of the sheet, taking into account the physical margin (top and left).
  • The physical print area is set to the maximum when the parameters of iMargin are all equal to 0 (default value).
Component: wd300prn.dll
Minimum version required
  • Version 9
This page is also available for…
Comments
Click [Add] to post a comment

Last update: 09/24/2024

Send a report | Local help