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.
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
Pritns a text in HTML format in a rectangular area. The print is not started (only iEndPrinting can be used to start the print).
Example
iPreview(iPage)
 
// Retrieve the height of the area
dHeight is real
dHeight = iZoneHeight(sHTMLText, 100, iHTML)
 
// Draws a border
iBorder(0,0, 200, dHeight*2)
 
// Print the HTML text inside the border
iPrintZoneHTML(sHTMLText, 0, 0, 200, dHeight*2)
 
iEndPrinting()
// Printing HTML on several pages
PROCEDURE PrintFileHTMLMultiPage(LOCAL sHTMLtoPrintInUTF8is an ANSI string,
LOCAL x1 is a real = 0,LOCAL y1 is a real = iYPos(),
LOCAL x2 is a real = iPageWidth() - x1)
// Work variables
nStartElement is an integer= 0
nElementFin is an integer= 0
rRemainingHeight is a real = 0
rLastLastHeightPrinted is a real = 0
 
// Loop to print all the HTML "elements".
LOOP
// Height of what remains to be printed
rRemainingHeight = iZoneHeight( sHTMLtoPrintEnUTF8, x2-x1, iHTML, nElementStart + 1)
RESTING HEIGHT <=
// Nothing more to print
// Position the "print cursor" after what has been printed.
iYPos( y1 + rLastHeightPrinted)
BREAK
END
// Stores the last printed pitch
rLastHeightPrintedHeight = rRestHeight
// If it&apos;s not the beginning, we jump to the next page.
0
iSkipPage()
// So we go back to the top of the page
y1 = 0
END
// Prints everything that comes into the area.
nEndElement = iPrintZoneHTML( sHTMLtoPrintEnUTF8, x1, y1, ...
x2, iPageHeight(), nElementStart + 1)
// We continue from the following element
nStart element = nEnd element
END
Syntax
<Result> = iPrintZoneHTML(<HTML text> , <X1> , <Y1> , <X2> , <Y2> [, <Start> [, <End>]])
<Result>: Integer
Subscript of the last printed HTML element in the rectangular area (WINDEV/WEBDEV specific count).
<HTML text>: Character string
Character string in HTML format that must be printed in a specific area.
<X1>: Real
Horizontal coordinate of top left corner of the print area (in millimeters).
Value included between 0 and the page width (returned by iPageWidth).
<Y1>: Real
Vertical coordinate of top left corner of the print area (in millimeters).
Value included between 0 and the page height (returned by iPageHeight).
<X2>: Real
Horizontal coordinate of bottom right corner of the print area (in millimeters).
Value included between 0 and the page width (returned by iPageWidth).
<Y2>: Real
Vertical coordinate of bottom right corner of the print area (in millimeters).
Value included between 0 and the page height (returned by iPageHeight).
<Start>: Optional integer
Subscript of the first HTML element found in the <HTML text> to print. If this parameter is not specified, the <HTML text> is printed from the first HTML element.
<End>: Optional integer
Subscript of the last HTML element found in the <HTML text> to print. If this parameter is not specified, the <HTML text> is printed until the last HTML element.
Component : wd260prn.dll
Minimum version required
  • Version 18
This page is also available for…
Comments
Click [Add] to post a comment