PC SOFT

ONLINE HELP
FOR WINDEV, WEBDEV AND WINDEV MOBILE

Home | Sign in | English US
  • 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/iPadApple WatchUniversal Windows 10 AppWindows Mobile
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 the iPhone/iPad applications.
New in version 18
iPhone/iPad This function is now available for the iPhone/iPad applications.
iPhone/iPad This function is now available for the 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 the Android applications.
New in version 19
Android Widget This function is now available in Android Widget mode.
Android This function is now available for the Android applications.
Android Widget This function is now available in Android Widget mode.
Android This function is now available for the 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)
// Find out the physical margins of a printer
iMargin(0, 0, 0, 0)
MarginH = (PaperHeight - iPageHeight())/2
MarginW = (PaperWidth - 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, the margins can be redefined several 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 top left corner of the sheet, taking into account the physical margin (top and left).
  • The physical print area is maximal when the parameters of iMargin are all equal to 0 (default value).
Components
WINDEVWEBDEV - Server codeReports and Queries wd230prn.dll
Windows Mobile wp230prn.dll
Java wd230java.jar
Linux wd230prn.so
Android wd230android.jar
Minimum required version
  • Version 9
This page is also available for…
Comments
Click [Add] to post a comment