|
|
|
|
- Impresión de un texto RTF justificado
- Impresión RTF con pausas Page
- Impresión RTF
Imprime el formato de texto enriquecido (RTF) en un área rectangular. El trabajo de impresión no se inicia (solo inicia al utilizar la función iEndPrinting). iPrintAreaRTF(RTFText, 0, 0, dHeight, 200) Sintaxis
<Result> = iPrintAreaRTF(<RTF text> , <X1> , <Y1> , <X2> , <Y2> [, <Start> [, <End>]])
<Result>: Integro Índice del último elemento RTF impreso en el área rectangular (recuento específico de WINDEV/WEBDEV). <RTF text>: Cadena de caracteres Cadena de RTF que se imprimirá en un área específica. <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 carácter de la a imprimir. Si no se especifica este parámetro, la dirección se imprime desde el primer carácter. <End>: Entero opcional Índice del último carácter de la a imprimir. Si no se especifica este parámetro, se imprime hasta el último carácter. Observaciones Impresión de un texto RTF justificado Para imprimir un texto con la función iPrintAreaRTF sin cambiar la justificación, se debe utilizar previamente la función iParameter de la siguiente manera: iParameter("RTFJustification=Yes")
Si se utilizan los parámetros para dividir texto RTF ( y ), se almacenará el texto de justificación del texto. Impresión RTF con pausas Page El siguiente código imprime el RTF que contiene las roturas programadas de Page: // 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) // Skips the page if other pages are found IF nSize < nTextSize AND nSize > nStart THEN iSkipPage() END TO DO WHILE nSize < nTextSize AND nSize > nStart // End of print iEndPrinting() Para usar iPrintAreaRTF , el archivo "RICHED20.DLL" debe estar en la computadora actual. En la mayoría de los casos, el archivo "RICHED20.DLL" se encuentra en el directorio del sistema de Windows.
Esta página también está disponible para…
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|