ONLINE HELP
 WINDEVWEBDEV AND WINDEV MOBILE

Help / WLanguage / WLanguage functions / Standard functions / Print functions
  • When to use iDestination?
  • Android: Printing in PDF
  • Printing in PDF
  • End of print
WINDEV
WindowsLinuxUniversal Windows 10 AppJavaReports and QueriesUser code (UMC)
WEBDEV
WindowsLinuxPHPWEBDEV - Browser code
WINDEV Mobile
AndroidAndroid Widget iPhone/iPadIOS WidgetApple WatchMac CatalystUniversal Windows 10 App
Others
Stored procedures
Configures and returns the print destination.
You can print:
  • directly on the printer (syntax 1 and syntax 2).
  • directly in a file in text, HTM, RTF, PDF, PRN or XML format (syntax 3).

    Universal Windows 10 AppAndroidiPhone/iPadIOS WidgetMac Catalyst In this version, the print can be performed in a PDF file only.
  • directly a duplicate (syntax 4).
  • directly on a fax (syntax 5 and syntax 6 sending a report to a fax number, for example). For more details, see Sending faxes.
Universal Windows 10 AppAndroidAndroid Widget iPhone/iPadIOS WidgetMac Catalyst Only the prints in PDF format are available.
Example
Syntax

Printing in a file (HTM, PCL, PDF, PRN, RTF, XLS, XML, ...) Hide the details

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: the printer settings are very important. See remarks.
Universal Windows 10 AppAndroidAndroid Widget iPhone/iPadIOS WidgetMac Catalyst 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 print mode does not use the current print driver so that an identical result is guaranteed from one computer to another.
Universal Windows 10 AppAndroidAndroid Widget iPhone/iPadIOS WidgetMac Catalyst 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.
Universal Windows 10 AppAndroidAndroid Widget iPhone/iPadIOS WidgetMac Catalyst 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.
Universal Windows 10 AppAndroidAndroid Widget iPhone/iPadIOS WidgetMac Catalyst 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: The maximum format is the A4 format.
This print mode does not use the current print driver so that an identical result is guaranteed from one computer to another.
Android The PDF prints support the standard Adobe fonts only (no Unicode format): 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, "Project fonts"). 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.
Universal Windows 10 AppAndroidAndroid Widget iPhone/iPadIOS WidgetMac Catalyst 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.
Universal Windows 10 AppAndroidAndroid Widget iPhone/iPadIOS WidgetMac Catalyst 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.
Universal Windows 10 AppAndroidAndroid Widget iPhone/iPadIOS WidgetMac Catalyst 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: the printer settings are very important. See remarks.
Universal Windows 10 AppAndroidAndroid Widget iPhone/iPadIOS WidgetMac Catalyst 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: the printer settings are very important. See remarks.
Universal Windows 10 AppAndroidAndroid Widget iPhone/iPadIOS WidgetMac Catalyst 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.
Universal Windows 10 AppAndroidAndroid Widget iPhone/iPadIOS WidgetMac Catalyst 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.
AndroidAndroid Widget This constant is not available.
Warning
From version 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.
Remark: You can configure the elements of the new email with iParameterExport.
Universal Windows 10 AppAndroidAndroid Widget iPhone/iPadIOS WidgetMac Catalyst 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: the printer settings are very important. See remarks.
Universal Windows 10 AppAndroidAndroid Widget iPhone/iPadIOS WidgetMac Catalyst 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: the printer settings are very important. See the remarks.
Universal Windows 10 AppAndroidAndroid Widget iPhone/iPadIOS WidgetMac Catalyst 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.
Universal Windows 10 AppAndroidAndroid Widget iPhone/iPadIOS WidgetMac Catalyst 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.
Universal Windows 10 AppAndroidAndroid Widget iPhone/iPadIOS WidgetMac Catalyst 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.
Remarks

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: iDestination can be called before printing a report (with iPrintReport) to choose the print destination.
AndroidAndroid Widget

Android: Printing in 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")
Caution: The PDF prints support the standard Adobe fonts only (no Unicode format): Courier, Helvetica, Times, Symbol and ZapFDingbats.
AndroidAndroid Widget iPhone/iPadIOS WidgetMac Catalyst

Printing in PDF

The generated PDF file can be directly printed by iPrintPDF.
iPhone/iPadIOS WidgetMac Catalyst

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.
Business / UI classification: Neutral code
Component: wd290prn.dll
Minimum version required
  • Version 9
This page is also available for…
Comments
Click [Add] to post a comment

Last update: 06/23/2023

Send a report | Local help