ONLINE HELP
 WINDEVWEBDEV AND WINDEV MOBILE

Help / Developing an application or website / Controls, windows and pages / Controls: Available types / Rich Text Area control
  • 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("Page width: " + iPageWidth() + "mm")
iPrint("Page height: " + 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

Last update: 05/26/2022

Send a report | Local help