PC SOFT

ONLINE HELP
 WINDEVWEBDEV AND WINDEV MOBILE

Home | Sign in | English EN
This content has been translated automatically. Click here to view the French version.
  • When should I use iMargin?
  • Logical margins and physical margins
WINDEV
WindowsLinuxUniversal Windows 10 AppJavaReports and QueriesUser code (UMC)
WEBDEV
WindowsLinuxPHPWEBDEV - Browser code
WINDEV Mobile
AndroidAndroid Widget iPhone/iPadIOS WidgetApple WatchMac CatalystUniversal Windows 10 App
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 in the report editor.
Versions 18 and later
iPhone/iPad This function is now available for iPhone/iPad applications.
New in version 18
iPhone/iPad This function is now available for iPhone/iPad applications.
iPhone/iPad This function is now available for iPhone/iPad applications.
Versions 19 and later
Android Widget This function is now available in Android widget mode.
Android This function is now available for Android applications.
New in version 19
Android Widget This function is now available in Android widget mode.
Android This function is now available for Android applications.
Android Widget This function is now available in Android widget mode.
Android This function is now available for Android applications.
Versions 21 and later
Universal Windows 10 App This function is now available in Universal Windows 10 App mode.
New in version 21
Universal Windows 10 App This function is now available in Universal Windows 10 App mode.
Universal Windows 10 App This function is now available in Universal Windows 10 App mode.
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, it is possible to redefine the margins several times with the function iMargin. For each print, the origin of the print will use the last defined margins.
  • The iMargin function must not be called in the processing of an report made 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 top left corner of the sheet, taking into account the physical margin (top and left).
  • The physical print area is maximum when the parameters of iMargin are all equal to 0 (values by Default).
Component: wd270prn.dll
Minimum version required
  • Version 9
This page is also available for…
Comments
Click [Add] to post a comment