PC SOFT

WINDEVWEBDEV AND WINDEV MOBILE
ONLINE HELP

Home | Sign in | English UK
  • Example 1: Printing the dimensions of the sheet
  • Example 2: Number of characters and number of lines
  • Example 3: Calculating the physical margins of the printer
iPageHeight (Example)
Example 1: Printing the dimensions of the sheet
The following example is used to print the dimension of the current sheet.
iPrint("Width of page: " + iPageWidth() + "mm")
iPrint("Height of page: " + iPageHeight() + "mm")
iEndPrinting()
Example 2: Number of characters and number of lines
The following example is used to find out, for a given font, the number of characters in a line and the number of lines in a page.
iCreateFont(1, 25, iNormal, iRoman)
iPrint("Number of characters in a line" + iPageWidth(1))
iPrint("Number of lines in the page" + iPageHeight(1))
iEndPrinting()
Example 3: Calculating the physical margins of the printer
This example is used to calculate the physical margins of the printer.
iMargin(0, 0, 0, 0)
MarginH = (PaperHeight - iPageHeight())/2
MarginW = (PaperWidth - iPageWidth())/2
Minimum version required
  • Version 9
This page is also available for…
Comments
Click [Add] to post a comment