|
|
|
|
|
iPrintAreaHTML (Function) In french: iImprimeZoneHTML
Warning
From version 28, iPrintZoneHTML is kept for backward compatibility. This function has been replaced with iPrintAreaHTML.
Pritns a text in HTML format in a rectangular area. The print job is not started (only iEndPrinting can be used to start the print job). iDestination(iPage)
dHauteur is real
dHauteur = iAreaHeight(sTexteHTML, 100, iHTML)
iBorder(0,0, 200, dHauteur*2)
iPrintAreaHTML(sTexteHTML, 0, 0, 200, dHauteur*2)
iEndPrinting()
PROCEDURE ImprimeZoneHTMLMultiPage(LOCAL sHTMLàImprimerEnUTF8 is string ANSI,
LOCAL x1 is real = 0,LOCAL y1 is real = iYPos(),
LOCAL x2 is real = iPageWidth() - x1)
nElémentDébut is int = 0
nElémentFin is int = 0
rHauteurRestante is real = 0
rDernièreHauteurImprimée is real = 0
LOOP
rHauteurRestante = iAreaHeight(sHTMLàImprimerEnUTF8, x2-x1, iHTML, nElémentDébut + 1)
IF rHauteurRestante <= 0 THEN
iYPos(y1 + rDernièreHauteurImprimée)
BREAK
END
rDernièreHauteurImprimée = rHauteurRestante
IF nElémentDébut > 0 THEN
iSkipPage()
y1 = 0
END
nElémentFin = iPrintAreaHTML(sHTMLàImprimerEnUTF8, x1, y1, ...
x2, iPageHeight(), nElémentDébut + 1)
nElémentDébut = nElémentFin
END
Syntax
<Result> = iPrintAreaHTML(<HTML text> , <X1> , <Y1> , <X2> , <Y2> [, <Start> [, <End>]])
<Result>: Integer Index of the last HTML element printed 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. This string must be encoded using UTF-8. If necessary, use StringToUTF8 to perform the conversion. <X1>: Real Horizontal coordinate of the upper-left corner of the print area (in millimeters). Value between 0 and the page width (returned by iPageWidth). <Y1>: Real Vertical coordinate of the upper-left corner of the print area (in millimeters). Value between 0 and the page height (returned by iPageHeight). <X2>: Real Horizontal coordinate of the lower-right corner of the print area (in millimeters). Value between 0 and the page width (returned by iPageWidth). <Y2>: Real Vertical coordinate of the lower-right corner of the print area (in millimeters). Value between 0 and the page height (returned by iPageHeight). <Start>: Optional integer Index 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 Index 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.
This page is also available for…
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|