ONLINE HELP
 WINDEVWEBDEV AND WINDEV MOBILE

Help / Editors / Report editor / Principles
  • Overview
  • Printing a report created with the report editor
  • Printing a report in PDF format
  • Remarks
  • Examples
  • Printing a programmed print
  • Printing a WLanguage print in PDF format
  • Remarks
  • Examples
  • Notes and limitations
  • General advice
  • Availability of controls in the reports
  • Control in RTF
  • PDF in the background of a report
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
Overview
WINDEV, WEBDEV and WINDEV Mobile allow you to create a PDF file during a print.
This PDF file can be created:
  • Universal Windows 10 AppiPhone/iPad from a report created in the report editor.
  • from a print performed with the WLanguage functions.
Universal Windows 10 AppAndroidAndroid Widget iPhone/iPad Remarks:
  • AndroidAndroid Widget Only the prints performed through programming and in PDF format are available. No print can be performed via the report editor.
  • Universal Windows 10 AppiPhone/iPad Only the prints in PDF format are available (report print or print performed through programming).
Universal Windows 10 AppiPhone/iPad
Printing a report created with the report editor

Printing a report in PDF format

To print a report in PDF format:
  1. Create the requested report in the report editor.
  2. In the print process of the report in PDF format:
    • Configure the options for printing in PDF format with iParameterPDF. You can define:
      • the password used to open the PDF file.
      • the options for compressing images.
      • the options for the presence of bookmarks.
      • the options for protecting the PDF file. You also have the ability to define the password used to modify these protection options.
      • the use of the Unicode format.
    • Define the report destination with iDestination. In this case, the report must be printed in PDF format (iPDF or iGenericPDF constant).
    • Start printing the report in PDF format with iPrintReport.

Remarks

  • The order in which iDestination and iParameterPDF are used is not important.
  • iPhone/iPad If necessary, the created PDF file can be printed from the device by iPrintPDF. This function allows you to use the native system window to configure the file print.
  • Universal Windows 10 AppiPhone/iPad The generated PDF file can be directly opened by ShellExecute.

Examples

iDestination(iPDF)
iPrintReport(RPT_MyPDFReport)
iDestination(iPDF)
// Protect the PDF file against printing
// and against selection and copy/paste
// No password to open the PDF file
// Password for modifying the protection settings
iParameterPDF(iProtectionPrinting, iProtectionSelection, "", "Protection")
// Print the report
iPrintReport(RPT_MyPDFReport)
Printing a programmed print

Printing a WLanguage print in PDF format

To perform a WLanguage print in PDF format:
  1. Define the destination of the print and the parameters of the PDF file to generate with:
    • iDestination to define the print in PDF format (iPDF or iGenericPDF constant).
    • iParameterPDF to configure the options for printing in PDF format. You can define:
      • the password used to open the file.
      • the options for compressing images.
      • the options for the presence of bookmarks.
      • the options for protecting the PDF file. You also have the ability to define the password used to modify these protection options.
  2. Use the print functions to define the content of the print.
  3. Start the print job with iEndPrinting.

Remarks

  • The order in which iDestination and iParameterPDF are used is not important.
  • AndroidAndroid Widget iPhone/iPad If necessary, the created PDF file can be printed from the device by iPrintPDF.
    • iPhone/iPad This function allows you to use the native system window to configure the file print.
    • AndroidAndroid Widget This function allows you to print the file by using the Cloud Print service of Google.
  • Universal Windows 10 AppAndroidAndroid Widget iPhone/iPad The generated PDF file can be directly opened by ShellExecute.
  • AndroidAndroid Widget The PDF prints support the standard Adobe fonts only (no Unicode format): Courrier, Helvetica, Times, Symbol and ZapFDingbats.

Examples

// Create the PDF file
iDestination(iPDF, "C:\Temp\MyPDF.PDF")
// Print code
iCreateFont(1, 16, iBold, iRoman)
//Call to procedures used to print the content
PrintTitle()
PrintText()
// End of print and close the created PDF file
iEndPrinting()
Notes and limitations

General advice

For a better rendering, use TrueType or OpenType fonts.
Caution: the OpenType fonts are not incorporated in the generated PDF. These fonts must be installed on the user computer to get a correct rendering.

Availability of controls in the reports

The following controls are not available:
  • Universal Windows 10 AppiPhone/iPad RTF control
  • Universal Windows 10 AppiPhone/iPad Edit control
  • Universal Windows 10 AppiPhone/iPad Signature control
  • Universal Windows 10 AppiPhone/iPad Organizer control
  • Universal Windows 10 AppiPhone/iPad Scheduler control
  • Universal Windows 10 AppiPhone/iPad Gantt Chart control
  • Universal Windows 10 AppiPhone/iPad Pivot Table control
  • Universal Windows 10 AppiPhone/iPad Spreadsheet control
  • Universal Windows 10 AppiPhone/iPad HTML control
  • Chart control: Only the Chart controls created from version 17 are available.

Control in RTF

General limitations:
  • The static control in RTF format may be truncated during a page break.
  • The arrays found in an RTF control are not printed.
  • The images used in the RTF controls are not printed.
iParameter associated with the "RTFWINDOWS=NO" parameter or with the iRTFWithImagesAndTables constant is used to properly print the tables and images found in RTF controls.
Universal Windows 10 AppiPhone/iPad The RTF controls and the RTF options are not available.
Universal Windows 10 AppiPhone/iPad

PDF in the background of a report

A PDF cannot be used in background image of the report.
Minimum version required
  • Version 9
This page is also available for…
Comments
Click [Add] to post a comment

Last update: 05/02/2023

Send a report | Local help