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
  • Printing a justified RTF text
  • Printing RTF with page breaks
  • Printing RTF
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, iPrintZoneRTF se conserva por motivos de compatibilidad. Esta función ha sido reemplazada por iPrintAreaRTF.
Prints rich text format (RTF) in a rectangular area. The print job is not started (only iEndPrinting can be used to start the print job).
iPrintAreaRTF(RTFText, 0, 0, dHeight, 200)
Sintaxis
<Result> = iPrintAreaRTF(<RTF text> , <X1> , <Y1> , <X2> , <Y2> [, <Start> [, <End>]])
<Result>: Integer
Index of the last RTF element printed in the rectangular area (WINDEV/WEBDEV specific count).
<RTF text>: Character string
RTF string that will be printed in a specific area.
<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 character in the <RTF text> to print. If this parameter is not specified, the <RTF text> is printed from the first character.
<End>: Optional integer
Index of the last character in the <RTF text> to print. If this parameter is not specified, the <RTF text> is printed up to the last character.
Observaciones

Printing a justified RTF text

To print a text with iPrintAreaRTF while keeping its justification, iParameter must be previously used as follows:
iParameter("RTFJustification=Yes")
If the parameters used to divide RTF text are used (<Start> and <End>), the text justification text will be stored.

Printing RTF with page breaks

The following code prints RTF containing programmed page breaks:
// Open the report viewer
iDestination(iViewer)
// Convert the text
sText is string = RTFToText(EDT_EditText)
// Text size
nTextSize is int = Length(sText)
// Delete the number of page breaks to the size of the text
nTextSize -= StringCount(sText, Charact(12))
// CR must correspond to one single character
nTextSize -= StringCount(sText, Charact(13))

// Loop on all the pages
nStart is int
nSize is int = -1
LOOP
	// Prints the page
	nStart = nSize + 1
	nSize = iPrintAreaRTF(EDT_EditText, 0, 0, iPageWidth(), iPageHeight(), nStart, -1)
	// Skip page if any pages remain
	IF nSize < nTextSize AND nSize > nStart THEN 
		iSkipPage()
	END
TO DO WHILE nSize < nTextSize AND nSize > nStart 
// End of print
iEndPrinting()

Printing RTF

To use iPrintAreaRTF, the "RICHED20.DLL" file must be on the current computer.
In most cases, the "RICHED20.DLL" file is in the Windows system directory.
Componente: wd300prn.dll
Versión mínima requerida
  • Versión 9
Esta página también está disponible para…
Comentarios
Haga clic en [Agregar] para publicar un comentario

Última modificación: 28/03/2025

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