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
WindowsLinuxUniversal Windows 10 AppJavaReportes y ConsultasCódigo de Usuario (UMC)
WEBDEV
WindowsLinuxPHPWEBDEV - Código Navegador
WINDEV Mobile
AndroidWidget Android iPhone/iPadIOS WidgetApple WatchMac CatalystUniversal Windows 10 App
Otros
Procedimientos almacenados
Imprime un texto en formato HTML en un área rectangular. El trabajo de impresión no se inicia (solo inicia al utilizar la función iEndPrinting).
Ejemplo
iDestination(iPage)
 
// Retrieve the height of the area
dHeight is real
dHeight = iAreaHeight(sHTMLText, 100, iHTML)
 
// Draws a border
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 = iPosY(),
LOCAL x2 is real = iLargeurPage() - 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
iPosY(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>: Integro
Índice del último elemento HTML impreso en el área rectangular (recuento específico de WINDEV/WEBDEV).
<HTML text>: Cadena de caracteres
Cadena de caracteres en formato HTML que debe imprimirse en un área específica. Esta cadena debe estar codificada con UTF-8. Si es necesario, utilice StringToUTF8 para realizar la conversión.
<X1>: Real
Coordenada horizontal de la esquina superior izquierda del área de impresión (en milímetros).
Valor entre 0 y el ancho de la página (devuelto por iPageWidth).
<Y1>: Real
Coordenada vertical de la esquina superior izquierda del área de impresión (en milímetros).
Valor entre 0 y la altura de la página (devuelto por iPageHeight).
<X2>: Real
Coordenada horizontal (columna o abscisa) de la esquina inferior derecha del área de impresión (en milímetros).
Valor entre 0 y el ancho de la página (devuelto por iPageWidth).
<Y2>: Real
Coordenada vertical de la esquina inferior derecha del área de impresión (en milímetros).
Valor entre 0 y la altura de la página (devuelto por iPageHeight).
<Start>: Entero opcional
Índice del primer elemento HTML encontrado en el para imprimir. Si no se especifica este parámetro, la dirección se imprime a partir del primer elemento HTML.
<End>: Entero opcional
Índice del último elemento HTML encontrado en el para imprimir. Si no se especifica este parámetro, se imprime hasta el último elemento HTML.
Componente: wd290prn.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: 22/06/2023

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