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)
 
// Récupération de la hauteur de la zone
dHauteur is real
dHauteur = iZoneHeight(sTexteHTML, 100, iHTML)
 
// Trace un cadre
iBorder(0,0, 200, dHauteur*2)
 
// Impression du HTML dans le cadre
iPrintZoneHTML(sTexteHTML, 0, 0, 200, dHauteur*2)
 
iEndPrinting()
// Impression de HTML sur plusieurs pages
PROCÉDURE ImprimeZoneHTMLMultiPage(LOCAL sHTMLàImprimerEnUTF8 is string ANSI,
LOCAL x1 is real = 0,LOCAL y1 is real = iYPos(),
LOCAL x2 is real = iPageWidth() - x1)
// Variables de travail
nElémentDébut is int = 0
nElémentFin is int = 0
rHauteurRestante is real = 0
rDernièreHauteurImprimée is real = 0
 
// Boucle pour imprimer tous les "éléments" du HTML
LOOP
// Hauteur de ce qui reste à imprimer
rHauteurRestante = iZoneHeight(sHTMLàImprimerEnUTF8, x2-x1, iHTML, nElémentDébut + 1)
IF rHauteurRestante <= 0 THEN
// Plus rien à imprimer
// On positionne le "curseur d'impression" après ce qui a été imprimé
iYPos(y1 + rDernièreHauteurImprimée)
BREAK
END
// Mémorise la dernière hauteur imprimée
rDernièreHauteurImprimée = rHauteurRestante
// Si ce n'est pas le début, on saute à la page suivante
IF nElémentDébut > 0 THEN
iSkipPage()
// On repart donc en haut de la page
y1 = 0
END
// Imprime effectivement tout ce qui rentre dans la zone
nElémentFin = iPrintZoneHTML(sHTMLàImprimerEnUTF8, x1, y1, ...
x2, iPageHeight(), nElémentDébut + 1)
// On continue à partir de l'élément suivant
nElémentDébut = nElémentFin
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. This string must be in UTF8 format. If necessary, use the StringToUTF8 function to perform the conversion.
<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