PC SOFT

ONLINE HELP
 WINDEVWEBDEV AND WINDEV MOBILE

Home | Sign in | English EN
This content has been translated automatically. Click here to view the French version.
  • When to use iDestination?
  • Android: Printing in PDF format
  • Printing in PDF format
  • 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.
  • Versions 15 and later
    directly a duplicate (syntax 4).
    New in version 15
    directly a duplicate (syntax 4).
    directly a duplicate (syntax 4).
  • directly on a fax (syntax 5 and syntax 6 sending a report to a fax number, for example). See Sending faxes for more details.
Versions 18 and later
iPhone/iPad This function is now available for iPhone/iPad applications.
New in version 18
iPhone/iPad This function is now available for iPhone/iPad applications.
iPhone/iPad This function is now available for iPhone/iPad applications.
Versions 19 and later
Android Widget This function is now available in Android Widget mode.
Android This function is now available for Android applications.
New in version 19
Android Widget This function is now available in Android Widget mode.
Android This function is now available for Android applications.
Android Widget This function is now available in Android Widget mode.
Android This function is now available for Android applications.
Universal Windows 10 AppAndroidAndroid Widget iPhone/iPadIOS WidgetMac Catalyst Only the prints in PDF format are available.
Versions 21 and later
Universal Windows 10 App This function is now available in Universal Windows 10 App mode.
New in version 21
Universal Windows 10 App This function is now available in Universal Windows 10 App mode.
Universal Windows 10 App This function is now available in Universal Windows 10 App mode.
Example
Syntax

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

iDestination([<Type of destination file> [, <Name of file to create>]])
<Type of destination file>: Optional integer constant
Used to configure the type of file to create:
Versions 23 and later
iEmailPDF
New in version 23
iEmailPDF
iEmailPDF
Direct print in 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 bits).
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 email with iParameterExport.
Universal Windows 10 AppAndroidAndroid Widget iPhone/iPadIOS WidgetMac Catalyst This constant is not available.
iFileDirect print in 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.
iGenericFileDirect print in 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.
iPrinterFileDirect print in a PRN file (<Name of file to create> file). <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.
iHTMLDirect print in an HTML file while 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.
iGenericHTMLDirect print in an HTML file while 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.
iHTMLWithoutCSSDirect print in 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.
iGenericHTMLWithoutCSSDirect print in 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.
iPCLDirect print in 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.
iPDFDirect print in 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.
iGenericPDFDirect print in 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. If specific fonts have been integrated into the project ("Advanced" tab of the description project window, "Project fonts" button), these fonts can be used (check that the font is redistributable). See Developing applications for Android for more details.
iRTFDirect print in a 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 remarks.
Universal Windows 10 AppAndroidAndroid Widget iPhone/iPadIOS WidgetMac Catalyst This constant is not available.
iGenericRTFDirect print in a 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.
iXLSDirect print in 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.
iGenericXLSDirect print in 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.
iXMLDirect print in 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.
iGenericXMLDirect print in 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.
<Name of 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 format

By default, if iDestination is not called before starting a print in PDF format, a "document.pdf" file will be generated in the directory of 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 (SD card for example) 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 format

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: wd270prn.dll
Minimum version required
  • Version 9
This page is also available for…
Comments
Click [Add] to post a comment