AYUDA EN LÍNEA
 WINDEVWEBDEV Y WINDEV MOBILE

Este contenido se ha traducido automáticamente.  Haga clic aquí  para ver la versión en inglés.
Ayuda / WLanguage / Funciones WLanguage / Funciones estándar / Funciones de impresión
WINDEV
WindowsLinuxJavaReportes y ConsultasCódigo de Usuario (UMC)
WEBDEV
WindowsLinuxPHPWEBDEV - Código Navegador
WINDEV Mobile
AndroidWidget Android iPhone/iPadIOS WidgetApple WatchMac Catalyst
Otros
Procedimientos almacenados
Advertencia
A partir de la versión 28, iPrintZoneHTML se conserva por motivos de compatibilidad. Esta función ha sido reemplazada por 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).
Ejemplo
iDestination(iPage)

// Retrieve the height of the area
dHeight is real
dHeight = iAreaHeight(sHTMLText, 100, iHTML)

// Draws the borders
iBorder(0,0, 200, dHeight*2)

// Print the HTML text inside the border
iPrintAreaHTML(sHTMLText, 0, 0, 200, dHeight*2)

iEndPrinting()
// Print HTML on multiple pages
PROCEDURE PrintAreaHTMLMultiPage(LOCAL sHTMLToPrintToUTF8 is ANSI string,
	LOCAL x1 is real = 0,LOCAL y1 is real = iYPos(), 
	LOCAL x2 is TO real number = iPageWidth() - x1)
// Working variables
nElementBeginning is int = 0
nElementEnd is int = 0
rRemainingHeight is real = 0
rLastHeightPrinted is real = 0

// Loop to print all the HTML "elements"
LOOP
	// Height of what remains to be printed
	rRemainingHeight = iAreaHeight(sHTMLToPrintToUTF8, x2-x1, iHTML, nElementBeginning + 1)
	IF rRemainingHeight <= 0 THEN
		// Nothing else to print
		// Position the "print cursor" after the last printed element
		iYPos(y1 + rLastHeightPrinted)
		BREAK
	END
	// Stores the last printed height
	rLastHeightPrinted = rRemainingHeight
	// If it's not the beginning, skip to the next page
	IF nElementBeginning > 0 THEN 
		iSkipPage()
		// Start at the top of the page
		y1 = 0
	END
	// Prints everything inside the give area
	nElementEnd is int = iPrintAreaHTML(sHTMLToPrintToUTF8, x1, y1, ...
		x2, iPageHeight(), nElementBeginning + 1)
	// Continue from the following element
	nElementBeginning = nElementEnd
END
Sintaxis
<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.
Componente: wd300prn.dll
Versión mínima requerida
  • Versión 18
Esta página también está disponible para…
Comentarios
Haga clic en [Agregar] para publicar un comentario

Última modificación: 27/03/2025

Señalar un error o enviar una sugerencia | Ayuda local