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
  • When to use iDestination?
  • Android: Print to PDF
  • Printing in PDF format
  • Printing in HTML
  • Printing in XLS
  • Printing in RTF
  • Configuring the printer for printing in HTML, RTF and text format
  • Printing in PRN format
  • Printing in XML
  • Print characteristics
  • Printing on a fax
  • Printing a fax in landscape mode
  • Using a fax server installed on a computer other than the current computer
  • End of print
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
Configures and returns the print destination.
You can print:
  • directly on the printer (syntax 1).
  • WINDEV in a mini-preview window (syntax 1).
  • WINDEV in the report viewer (syntax 2). The user can preview the print result on the screen, page by page. In this viewer, you can:
    • scroll the pages (next page and previous page if they exist),
    • start the print job,
    • modify the scale of preview,
    • display the first page or the last page,
    • find out the number of the current page,
    • Novedad versión 2025
      display in 2-page side-by-side mode with a cover page,
    • etc.
  • directly in a file in text, HTM, RTF, PDF, PRN or XML format (syntax 3).
    WEBDEV - Código Servidor To obtain the same results during the development and on the deployed site, it is recommended to perform generic prints (with the iGenericPDF constant, for example).
    AndroidiPhone/iPadIOS WidgetMac Catalyst In this version, the print job can be performed in a PDF file only.
  • directly a duplicate (syntax 4).
  • directly to a fax machine (syntax 6 and syntax 7, sending a status message to a fax number, for example). For more details, see Sending faxes.
AndroidWidget Android iPhone/iPadIOS WidgetMac Catalyst Only the prints in PDF format are available.
WINDEVReportes y Consultas Note: The iDestination function can also be used to identify the type of printout made (used in the report opening code or in the report "Before reprint" code).. For more details, see syntax 8.
Ejemplo
WINDEVWEBDEV - Código ServidorReportes y ConsultasWindowsCódigo de Usuario (UMC)Ajax
// Print to HTML
iDestination(iHTML, "C:\My documents\MyReport.HTM")
// "C:My documents\MyReport.HTM" corresponds to the name and
// path of the HTM file that will be created with "RPT_MySummaryReport"
iPrintReport(RPT_MySummaryReport)
WINDEVWEBDEV - Código ServidorReportes y ConsultasWindowsLinuxCódigo de Usuario (UMC)Ajax
// Print to PDF
FileName is string = CompleteDir(fDataDir()) + "i" + Invoice + Customer + ".PDF"
iDestination(iGenericPDF, FileName)
iPrintReport(RPT_Invoice, Customer, Invoice)
// Checks whether it is a WEBDEV site
IF InWebMode() = True THEN
	// Print performed from a WEBDEV site
	// Send the file to the Web user
	FileDisplay(FileName, "application/pdf")
	Multitask(0)
	// Delete the file from the server
	fDelete(FileName)
END
WINDEVWEBDEV - Código ServidorReportes y ConsultasWindowsCódigo de Usuario (UMC)Ajax
// Generate a PRN file
iDestination(iPrinterFile, "C:\Temp\MyPrint.prn")
WINDEVReportes y ConsultasWindowsCódigo de Usuario (UMC)
// Generate a PDF file and open the default messaging software
iDestination(iPDFEMail, "MyAttachment.PDF")

// Configure the email software (optional)
iParameterExport(iExportEmailRecipient, "Wam@CrazyMail.com; Celia.Wat@ZMail.fr")
iParameterExport(iExportEmailSender, "Itsme@Berrymail.com")
iParameterExport(iExportEmailSubject, "Result of yearly sales")
iPrintReport(RPT_MyReport)
Sintaxis
WINDEVWEBDEV - Código ServidorReportes y ConsultasJavaCódigo de Usuario (UMC)Ajax

Printing directly to the printer or in a mini-preview Ocultar los detalles

iDestination([<Destination> [, <Name of the document>]])
<Destination>: Optional integer constant
Print destination.
iPrinterSend document directly to the printer.
WEBDEV - Código Servidor
  • This feature is mainly used for the Internet sites.
  • On the application server (in deployment), the print can only be done on the printers connected to the server. In this case, a specific configuration is required. For more details, see Configuring the server to perform a print job.
  • For web sites, we recommend printing as a generic PDF file.
iMiniPreviewPrinting in a mini-preview. This mini-preview allows you to display the pages to print and to define the printing options. Exports are also possible.
WEBDEV - Código ServidorJava This constant is not available.
<Name of the document>: Optional character string
  • When sending the document directly to a printer (iPrinter constant), it corresponds to the name to be given to the print job. This name will identify the printout in the list of documents processed by the printer.
  • For printing in a mini-preview (iMiniPreview constant), it corresponds to the title of the mini-preview window.
    If this parameter is not specified, the default title will be "Report preview" followed by the report name.
    If the user can generate files (Word, PDF, etc.) from the print mini-preview, the title of the preview will automatically be proposed as the file name. If this parameter is not specified, the name of the file will correspond to the name of the report.
WINDEVReportes y ConsultasCódigo de Usuario (UMC)

Printing in the report viewer Ocultar los detalles

iDestination(<Destination> [, <Zoom> [, <Report viewer title> [, <Print buttons> [, <Horizontal position> [, <Vertical position> [, <Width> [, <Height>]]]]]]])
<Destination>: Integer constant
Display in the report viewer:
iViewerPrint in the report viewer.
<Zoom>: Optional integer constant
Zoom when the report viewer is opened.
i2Pages
ipvZoom2Pages
Preview displaying 2 pages at a time.
Novedad versión 2025
i2PagesWithCover
iapZoom2PagesWithCover
Preview displaying 2 pages simultaneously, with the first page on the cover (the first page is a right-hand page).
i100
ipvZoom100
Preview with a zoom set to 100%.
iDefaultZoom
ipvZoomDefault
(default value)
Corresponds to:
  • ipvZoomPage when first used.
  • the last zoom set by the user in the report viewer, for subsequent uses.
iPage
ipvZoomPage
Preview with zoom out: the page will be entirely displayed in the zoom window.
ipvZoomPageWidthPreview displaying the entire page width.
Value from 10 to 999Preview with the specified zoom.

If this parameter is not specified, the default value corresponds to:
  • ipvZoomPage when the function is first used.
  • the zoom set by the user in the report viewer, for subsequent uses.
<Report viewer title>: Optional character string
Title displayed in the title bar of the window. If this parameter is not specified, the default title will be "Report preview" followed by the report name.
If the user has the ability to generate some files (Word, PDF, ...) from the report viewer, the preview title will be automatically proposed as file name. If this parameter is not specified, the name of the file will correspond to the name of the report.
<Print buttons>: Optional boolean
  • True (by default) to display the buttons allowing the user to start the print,
  • False to avoid displaying the buttons.
<Horizontal position>: Optional integer
Horizontal position of the report viewer window (in pixels). By default, the horizontal position corresponds to 100 pixels.
<Vertical position>: Optional integer
Vertical position of the report viewer window (in pixels). By default, the vertical position corresponds to 100 pixels.
<Width>: Optional integer
Dimensions of the report viewer window (in pixels). By default, the dimensions of this window are set to 640 (width) by 480 (height).
<Height>: Optional integer
Dimensions of the report viewer window (in pixels). By default, the dimensions of this window are set to 640 (width) by 480 (height).

Printing in a file (HTM, PCL, PDF, PRN, RTF, XLS, XML, ...) Ocultar los detalles

iDestination([<Type of destination file> [, <Name of the file to create>]])
<Type of destination file>: Optional integer constant
Used to configure the type of file to create:
iFilePrint to a text file. The file will be named <Report name>.TXT (where <Report name> corresponds to the name of report defined in the report editor). This file is created in the application directory. If <Name of file to create> is specified, the file name will be <Name of file to create>.TXT.
Caution: printer settings are important. See remarks.
WEBDEV - Código Servidor If the file directory is not specified, the file is generated in the data directory of the site. This directory can be configured by WDCOMPTE. This directory is returned by fDataDir. We recommend that you use iLastFile to open the last generated file.
LinuxAndroidWidget Android iPhone/iPadIOS WidgetMac CatalystJava This constant is not available.
iGenericFilePrint to a text file. The file will be named <Report name>.TXT (where <Report name> corresponds to the name of report defined in the report editor). This file is created in the application directory. If <Name of file to create> is specified, the file name will be <Name of file to create>.TXT.
This printing mode does not use the current printer driver, which makes sure that the result is the same from one computer to another.
WEBDEV - Código Servidor If the file directory is not specified, the file is generated in the data directory of the site. This directory can be configured by WDCOMPTE. This directory is returned by fDataDir. We recommend that you use iLastFile to open the last generated file.
LinuxAndroidWidget Android iPhone/iPadIOS WidgetMac CatalystJava This constant is not available.
iGenericHTMLPrint to an HTML file using a style sheet. The file will be named <Report name>.HTM (where <Report name> corresponds to the report name defined in the report editor). This file is created in the application directory.
This print mode must be used to manage the layers in the HTML pages.
If <Name of file to create> is specified, the file name will be <Name of file to create>.HTM. No preview will be displayed.
This print mode does not use the current print driver so that an identical result is guaranteed from one computer to another.
WEBDEV - Código Servidor If the file directory is not specified, the file is generated in the data directory of the site. This directory can be configured by WDCOMPTE. This directory is returned by fDataDir. We recommend that you use iLastFile to open the last generated file.
LinuxAndroidWidget Android iPhone/iPadIOS WidgetMac CatalystJava This constant is not available.
iGenericHTMLWithoutCSSPrint to an HTML file without using a style sheet. The file will be named <Report name>.HTM (where <Report name> corresponds to the report name defined in the report editor). This file is created in the application directory.
This print mode does not support layers in the HTML pages.
If <Name of file to create> is specified, the file name will be <Name of file to create>.HTM. No preview will be displayed.
This print mode does not use the current print driver so that an identical result is guaranteed from one computer to another.
WEBDEV - Código Servidor If the file directory is not specified, the file is generated in the data directory of the site. This directory can be configured by WDCOMPTE. This directory is returned by fDataDir. We recommend that you use iLastFile to open the last generated file.
LinuxAndroidWidget Android iPhone/iPadIOS WidgetMac CatalystJava This constant is not available.
iGenericPDFPrint to a PDF file. The file will be named <Report name>.PDF (where <Report name> corresponds to the report name defined in the report editor). This file is created in the application directory.
If <Name of file to create> is specified, the file name will be <Name of file to create>.PDF.
Caution: It is not possible to use a format larger than A4.
This print mode does not use the current print driver so that an identical result is guaranteed from one computer to another.
WEBDEV - Código Servidor If the file directory is not specified, the file is generated in the data directory of the site. This directory can be configured by WDCOMPTE. This directory is returned by fDataDir. We recommend that you use iLastFile to open the last generated file.
Android PDF printouts support only standard Adobe fonts (not Unicode): Courier, Helvetica, Times, Symbol and ZapFDingbats.. You can use specific fonts if they have been integrated into the project ("Advanced" tab of the project description window, "Fuentes del proyecto"). Before doing so, make sure the font is redistributable. For more details, see Developing applications for Android.
iGenericRTFPrint to an RTF file. The file will be named <Report name>.RTF (where <Report name> corresponds to the report name defined in the report editor). This file is created in the application directory.
If <Name of file to create> is specified, the file name will be <Name of file to create>.RTF. No preview will be displayed.
This print mode does not use the current print driver so that an identical result is guaranteed from one computer to another.
WEBDEV - Código Servidor If the file directory is not specified, the file is generated in the data directory of the site. This directory can be configured by WDCOMPTE. This directory is returned by fDataDir. We recommend that you use iLastFile to open the last generated file.
LinuxAndroidWidget Android iPhone/iPadIOS WidgetMac CatalystJava This constant is not available.
iGenericXLSPrint to an XLS file. The file will be named <Report name>.XLS (where <Report name> corresponds to the report name defined in the report editor). This file is created in the application directory.
If <Name of file to create> is specified, the file name will be <Name of file to create>.XLS. No preview will be displayed.
This print mode does not use the current printer driver so that an identical result is guaranteed from a computer to another one.
WEBDEV - Código Servidor If the file directory is not specified, the file is generated in the data directory of the site. This directory can be configured by WDCOMPTE. This directory is returned by fDataDir. We recommend that you use iLastFile to open the last generated file.
LinuxAndroidWidget Android iPhone/iPadIOS WidgetMac CatalystJava This constant is not available.
iGenericXMLPrint to an XML file. The file will be named <Report name>.XML (where <Report name> corresponds to the report name defined in the report editor). This file is created in the application directory.
If <Name of file to create> is specified, the file name will be <Name of file to create>.XML. No preview will be displayed.
This print mode does not use the current print driver so that an identical result is guaranteed from one computer to another.
WEBDEV - Código Servidor If the file directory is not specified, the file is generated in the data directory of the site. This directory can be configured by WDCOMPTE. This directory is returned by fDataDir. We recommend that you use iLastFile to open the last generated file.
LinuxAndroidWidget Android iPhone/iPadIOS WidgetMac CatalystJava This constant is not available.
iHTMLPrint to an HTML file using a style sheet. The file will be named <Report name>.HTM (where <Report name> corresponds to the report name defined in the report editor). This file is created in the application directory.
This print mode must be used to support the layers in the HTML pages.
If <Name of file to create> is specified, the file name will be <Name of file to create>.HTM. No preview will be displayed.
Caution: printer settings are important. See remarks.
WEBDEV - Código Servidor If the file directory is not specified, the file is generated in the data directory of the site. This directory can be configured by WDCOMPTE. This directory is returned by fDataDir. We recommend that you use iLastFile to open the last generated file.
LinuxAndroidWidget Android iPhone/iPadIOS WidgetMac CatalystJava This constant is not available.
iHTMLWithoutCSSPrint to an HTML file without using a style sheet. The file will be named <Report name>.HTM (where <Report name> corresponds to the report name defined in the report editor). This file is created in the application directory.
This print mode does not support layers in the HTML pages.
If <Name of file to create> is specified, the file name will be <Name of file to create>.HTM. No preview will be displayed.
Caution: printer settings are important. See remarks.
WEBDEV - Código Servidor If the file directory is not specified, the file is generated in the data directory of the site. This directory can be configured by WDCOMPTE. This directory is returned by fDataDir. We recommend that you use iLastFile to open the last generated file.
LinuxAndroidWidget Android iPhone/iPadIOS WidgetMac CatalystJava This constant is not available.
iPCLPrint to a PCL file (<Report name>.PCL file created in the application directory).
If <Name of file to create> is specified, the file name will be <Name of file to create>.PCL.
WEBDEV - Código Servidor If the file directory is not specified, the file is generated in the data directory of the site. This directory can be configured by WDCOMPTE. This directory is returned by fDataDir. We recommend that you use iLastFile to open the last generated file.
LinuxAndroidWidget Android iPhone/iPadIOS WidgetMac CatalystJava This constant is not available.
iPDFPrint to a PDF file. The file will be named <Report name>.PDF (where <Report name> corresponds to the report name defined in the report editor). This file is created in the application directory.
If <Name of file to create> is specified, the file name will be <Name of file to create>.PDF.
WEBDEV - Código Servidor If the file directory is not specified, the file is generated in the data directory of the site. This directory can be configured by WDCOMPTE. This directory is returned by fDataDir. We recommend that you use iLastFile to open the last generated file.
AndroidWidget Android Java This constant is not available.
Advertencia
A partir de la versión 27, this constant is available for backward compatibility. It is recommended to use the iGenericPDF constant, which improves the generation of PDF files.
iPDFEmailPrint to a PDF file and open the messaging software on the current computer.
This PDF file is directly attached to a new email created by using the MAPI client installed by a messaging software of the current computer. The MAPI client and the application must be installed in the same compilation mode (32/64-bit).
The file will be named <Report name>.PDF (where <Report name> corresponds to the report name defined in the report editor). This file is created in the application directory. If <Name of file to create> is specified, the file name will be <Name of file to create>.PDF.
Note: It is possible to parameterize the elements of the email created with the iParameterExport function..
WEBDEV - Código ServidorLinuxAndroidWidget Android iPhone/iPadIOS WidgetMac CatalystJava This constant is not available.
iPrinterFilePrint to a PRN file (<Name of file to create>). <Name of file to create> must contain the full name of PRN file.
Caution: printer settings are important. See remarks.
WEBDEV - Código ServidorLinuxAndroidWidget Android iPhone/iPadIOS WidgetMac CatalystJava This constant is not available.
iRTFPrint to an RTF file. The file will be named <Report name>.RTF (where <Report name> corresponds to the report name defined in the report editor). This file is created in the application directory.
If <Name of file to create> is specified, the file name will be <Name of file to create>.RTF. No preview will be displayed.
Caution: printer settings are important. See remarks.
WEBDEV - Código Servidor If the file directory is not specified, the file is generated in the data directory of the site. This directory can be configured by WDCOMPTE. This directory is returned by fDataDir. We recommend that you use iLastFile to open the last generated file.
LinuxAndroidWidget Android iPhone/iPadIOS WidgetMac CatalystJava This constant is not available.
iXLSPrint to an XLS file. The file will be named <Report name>.XLS (where <Report name> corresponds to the report name defined in the report editor). This file is created in the application directory.
If <Name of file to create> is specified, the file name will be <Name of file to create>.XLS. No preview will be displayed.
WEBDEV - Código Servidor If the file directory is not specified, the file is generated in the data directory of the site. This directory can be configured by WDCOMPTE. This directory is returned by fDataDir. We recommend that you use iLastFile to open the last generated file.
LinuxAndroidWidget Android iPhone/iPadIOS WidgetMac CatalystJava This constant is not available.
iXMLPrint to an XML file. The file will be named <Report name>.XML (where <Report name> corresponds to the report name defined in the report editor). This file is created in the application directory.
If <Name of file to create> is specified, the file name will be <Name of file to create>.XML. No preview will be displayed.
WEBDEV - Código Servidor If the file directory is not specified, the file is generated in the data directory of the site. This directory can be configured by WDCOMPTE. This directory is returned by fDataDir. We recommend that you use iLastFile to open the last generated file.
LinuxAndroidWidget Android iPhone/iPadIOS WidgetMac CatalystJava This constant is not available.
<Name of the file to create>: Optional character string
Name of generated file. If this parameter is not specified, the name of generated file corresponds to "Report Name". When printing in PRN format (with the iPrinterFile constant), the full name of file to create must be specified.
WINDEVWEBDEV - Código ServidorReportes y ConsultasWindowsCódigo de Usuario (UMC)

Printing a duplicate copy Ocultar los detalles

iDestination(<Destination type> [, <Name of the file to create> [, <Certificate> [, <Password>]]])
<Destination type>: Integer constant
Used to configure the type of file to create:
iDuplicatePrint to a duplicate file. The file will be named <Report name>.DPL (where <Report name> corresponds to the report name defined in the report editor). This file is created in the application directory.

Caution: This constant allows only a duplicate to be printed, not a full printout..
To create a duplicate copy of a print, we recommend that you use iParameterDuplicate then iDestination to print on the printer.
WEBDEV - Código Servidor If the file directory is not specified, the file is generated in the data directory of the site. This directory can be configured by WDCOMPTE. This directory is returned by fDataDir. We recommend that you use iLastFile to open the last generated file.
<Name of the file to create>: Optional character string
Name of duplicate file to create (without extension). The created file will be <Name of file to create>.DPL.
If this parameter corresponds to an empty string (""), the name of generated file will correspond to "Report Name".DPL.
<Certificate>: Certificate variable
Name of the Certificate variable that contains the certificate to be used to sign the duplicate.
<Password>: Character string or Secret string
Password of generated duplicate.
Novedad versión 2025
Cadenas secretas: Si utiliza el almacén de cadenas secretas, el tipo de cadena secreta utilizado para este parámetro debe ser "Cadena Ansi o Unicode".
Para obtener más información sobre cadenas secretas y cómo utilizar el almacén, consulte Almacén de cadenas secretas.
WINDEVWEBDEV - Código ServidorReportes y ConsultasCódigo de Usuario (UMC)

Print directly to a PCL printer (retained for compatibility) Ocultar los detalles

iDestination(<iPCL> , <Printer to use>)
<iPCL>: Constant
iPCL: Constant for printing directly to a PCL printer.
Please note: it is not possible to print in landscape mode on a PCL printer.
<Printer to use>: Character string
Path and name of PCL printer used. This printer must be accessible.
If this printer is accessible via Bluetooth, this parameter must correspond to "<Name of Bluetooth virtual output port>:".
If several printers are using the Bluetooth technology, a window allowing the user to choose a printer will be displayed during the print.
If this printer is accessible via Wi-Fi or network, this parameter must correspond to the name and UNC path of printer.
WINDEVWEBDEV - Código ServidorReportes y ConsultasCódigo de Usuario (UMC)Ajax

Printing on a fax directly without managing a status report (Windows 2000 and XP) Ocultar los detalles

iDestination(<iFax> , <Fax number to dial>)
<iFax>: Constant
iFax: Constant for printing directly on a fax machine.
<Fax number to dial>: Character string
Phone number corresponding to the fax where the print must be sent.
Caution: A modem must be installed on the current workstation.. The fax number must correspond to the features specified when configuring the modem.
WINDEVWEBDEV - Código ServidorReportes y ConsultasCódigo de Usuario (UMC)Ajax

Printing on a fax directly while managing a status report (Windows 2000 and XP) Ocultar los detalles

<Result> = iDestination(<iFax> , <Fax number to dial> , <Fax name> [, <Name or identifier of fax server>])
<Result>: Integer
  • Identifier of the connection to the fax server,
  • 0 if an error occurs. The corresponding error message is returned by ErrorInfo.
<iFax>: Constant
iFax: Constant for printing directly on a fax machine.
<Fax number to dial>: Character string
Phone number corresponding to the fax where the print must be sent.
Please note: a modem must be installed on the current workstation.. The fax number must correspond to the features specified when configuring the modem.
<Fax name>: Character string
Name used to identify the outgoing fax. The status of the outgoing fax is returned by FaxStatus.
<Name or identifier of fax server>: Optional character string or integer
Share name of fax server.
If this parameter is not specified or if it corresponds to an empty string, the fax server corresponds to the default fax server.
Warning: the fax server must be started and configured in send mode.. For more details, see Sending faxes.
Fax server identifier: If function FaxConnect was used before function iPreview, this parameter may correspond to the fax server connection identifier returned by function FaxConnect..
WINDEVReportes y Consultas

Finding out the destination of current print Ocultar los detalles

<Result> = iDestination()
<Result>: Optional integer constant
Type of print performed:
iDuplicatePrint to a duplicate file.
Use in "Before reprint" event: This constant is returned if the "Duplicate" button is used in the report viewer.
iEmailPrint to an email.
Use in "Before reprint" event: This constant is returned if the "Email with embedded content" button is used in the report viewer.
iFilePrint to a text file.
iGenericFilePrint to a text file.
iGenericHTMLPrint to an HTML file using a style sheet.
iGenericHTMLWithoutCSSPrint to an HTML file without using a style sheet.
iGenericPDFPrint to a PDF file.
iGenericRTFPrint to an RTF file.
iGenericXLSPrint to an XLS file.
iGenericXMLPrint to an XML file.
iHTMLPrint to an HTML file using a style sheet.
Use in "Before reprint" event: This constant is returned if the "HTML" button is used in the report viewer.
iHTMLWithoutCSSPrint to an HTML file without using a style sheet.
iPCLPrint to a PCL file.
iPDFPrint to a PDF file.
Use in "Before reprint" event: This constant is returned if the "PDF" button is used in the report viewer.
iPDFEmailPrint to a PDF attached to an email.
Use in "Before reprint" event: This constant is returned if the "Email with attached PDF" button is used in the report viewer.
iPrinterSend document directly to the printer.
Use in "Before reprint" event: This constant is returned if the "Print" button is used in the report viewer.
iPrinterFileDirectly prints into a PRN file (<Name of file to create> file).
iRTFPrint to an RTF file.
Use in "Before reprint" event: This constant is returned if the "Word" button is used in the report viewer.
iXLSPrint to an XLS file.
Use in "Before reprint" event: This constant is returned if the "XLS" button is used in the report viewer.
iXMLPrint to an XML file.
Use in "Before reprint" event: This constant is returned if the "XML" button is used in the report viewer.
Observaciones

When to use iDestination?

iDestination must be the first print function called. It must be called before iPrint, iCreateFont, etc. However, iDestination must be called after iConfigure or iParameter.
Remark: The iDestination function can be called before executing a report (with iPrintReport) to select the report execution destination.
AndroidWidget Android

Android: Print to PDF

By default, if iDestination is not called before printing to PDF, a "document.pdf" file will be generated in the directory of the application files.
If the PDF document generated by the print functions must be opened by an external application (with ShellExecute, for example), this document must be located on the external memory of the device (e.g., SD card) to be accessible by other applications.
Example:
iDestination(iGenericPDF, CompleteDir(SysDirStorageCard()) + "document.pdf")
Please note: Under Android, PDF printouts only support standard Adobe fonts (not Unicode): Courier, Helvetica, Times, Symbol and ZapFDingbats.
WINDEVWEBDEV - Código ServidorReportes y ConsultasWindowsAndroidWidget Android iPhone/iPadIOS WidgetMac CatalystCódigo de Usuario (UMC)Ajax

Printing in PDF format

The generated PDF file can be directly printed by iPrintPDF.
WINDEV The generated PDF file can be viewed via the PDF Reader control.
WINDEVWEBDEV - Código ServidorReportes y ConsultasWindowsCódigo de Usuario (UMC)Ajax

Printing in HTML

  • If the print is performed in an HTML page with a style sheet (iHTMLCSS constant), the style sheet is included in the HTML file. The method for printing in an HTML file is identical to the method for printing on a printer. The layers are supported and the management of the font size is precise.
  • If the print is performed in an HTML page without style sheet (iHTML constant), the following limitations may occur:
    • management of font size not precise
    • overlay not supported. You cannot write on an image for example.
  • Fonts oriented at 90° are not printed correctly in the HTML file: text is displayed with a horizontal font.
  • The rounded borders are not printed. They are replaced with standard borders.
WINDEVWEBDEV - Código ServidorReportes y ConsultasWindowsCódigo de Usuario (UMC)Ajax

Printing in XLS

  • The Image, Bar Code and Chart controls are not printed.
WINDEVWEBDEV - Código ServidorReportes y ConsultasWindowsCódigo de Usuario (UMC)Ajax

Printing in RTF

  • Printing in RTF only supports the text (with its style) and the images. The overlay of objects is not supported (lines or images). Several text lines cannot be displayed beside an image for example.
  • Fonts oriented at 90° are not printed correctly in the HTML file: text is displayed with a horizontal font.
  • To print to RTF, the "RICHED20.DLL" file must be on the current computer. In most cases, the "RICHED20.DLL" file is in the Windows system directory.
  • The borders are not printed.
  • The tables are supported by RTF. The font color and the background color of cells are stored.
WINDEVWEBDEV - Código ServidorReportes y ConsultasWindowsCódigo de Usuario (UMC)Ajax

Configuring the printer for printing in HTML, RTF and text format

  • If printing to a text fileonly the text is retrieved: lines, images, etc. are ignored.
  • Printing in HTML, RTF or text format depends on the configuration and on the resolution of the current printer. Therefore, if the current printer is configured in landscape mode with margins, these options will be used when printing in HTML, text or RTF format.
  • The finer the printer resolution is, the better the quality of the RTF, text or HTML print will be.
  • To avoid the overlapping problems when printing in HTML mode, you have the ability to adjust the printer settings.
WINDEVReportes y ConsultasWindowsCódigo de Usuario (UMC)

Printing in PRN format

When printing in PRN format, the PRN file is specific to the selected printer. This file is directly created by the printer driver, it is a binary file that can be interpreted by the printer.
This file can be printed thereafter on the specified printer or on any other printer of the same type via the "Print" command of DOS. The syntax of this command is:
Print /D:\\<Computer name>\<Name of declared printer> <Name of PRN file>

Example:
Print /D:\\Doc_Computer\CanonLBP Output.prn

Note For network printers, it is necessary to use the share name and not the printer name. The share name is found in the "Share" tab of printer description.
WINDEVWEBDEV - Código ServidorReportes y ConsultasWindowsCódigo de Usuario (UMC)Ajax

Printing in XML

When printing in XML format, only the data is printed. The characteristics of the page layout (lines, ...) are ignored.
WINDEVWEBDEV - Código ServidorWindowsCódigo de Usuario (UMC)Ajax

Print characteristics

  • When printing in PDF, the characteristics of the PDF file can be configured with iParameterPDF.
  • When printing in XLS, the characteristics of the XLS file can be configured with iParameterXLS.
WINDEVWEBDEV - Código ServidorReportes y ConsultasWindowsCódigo de Usuario (UMC)Ajax

Printing on a fax

Two syntaxes can be used to send a print to a fax:
  • Fax without management of status report. The print (performed later by iPrintReport for example) is directly sent to the specified phone number.
  • Fax with management of status code. The print (performed thereafter by iPrintReport for example) is sent to the specified phone number, via a fax server. iPreview returns the identifier of connection to this fax server. This identifier, as well as the name given to the fax, allow you to check the status of the outgoing fax with the Fax functions. For more details, see Sending faxes.
WINDEVWEBDEV - Código ServidorWindowsCódigo de Usuario (UMC)Ajax

Printing a fax in landscape mode

To configure the print of a fax in landscape mode (printing several faxes, including one in landscape mode), the print functions must be used in the following order:
  1. iDestination associated with the iFax constant.
  2. iParameter used to switch to landscape mode.
If this order is not respected, the setting of landscape mode will be ignored by the driver for fax management.
Example:
iDestination(iFax, "00046032032","Fax")
iParameter("ORIENTATION=LANDSCAPE")
iPrint("Print in landscape mode")
iEndPrinting()
WINDEVWEBDEV - Código ServidorWindowsCódigo de Usuario (UMC)Ajax

Using a fax server installed on a computer other than the current computer

You have the ability to use a fax server installed on a computer other than the current computer. In this case, the computer where the fax server is installed must be running Windows Server 2003. The fax server must be shared. Then, the name of fax server must be specified in iDestination.
The computer from which the faxes will be sent must be equipped with a local fax server.
For example, if the fax server is installed on "FaxServer1", use the following syntax:
iDestination(iFax, "00046032032","Fax","\\FaxServer1\Fax_Share")
WINDEVReportes y ConsultasWindowsiPhone/iPadIOS WidgetMac CatalystCódigo de Usuario (UMC)

End of print

iEndPrinting must necessarily be called to end the print except after a call to iPrintReport.
The next prints will be performed on the printer except if iDestination is run again.
Clasificación Lógica de negocio / UI: Código neutro
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: 23/11/2024

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