|
|
|
|
|
- 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
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
Esta página también está disponible para…
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|