Home | Sign in | English EN
  • Overview
  • Printing a programmed print
  • Printing a WLanguage print in PDF format
  • Remarks
  • Examples
  • Printing a PDF from the report viewer
  • Principle
  • Event "Before printing the report again"
  • Notes and limitations
  • General advice
  • Availability of controls in the reports
  • Control in RTF
WindowsLinuxUniversal Windows 10 AppJavaReports and QueriesUser code (UMC)
WindowsLinuxPHPWEBDEV - Browser code
AndroidAndroid Widget iPhone/iPadIOS WidgetApple WatchMac CatalystUniversal Windows 10 App
Stored procedures
WINDEV, WEBDEV and WINDEV Mobile allow you to create a PDF file during a print.
This PDF file can be created:
  • from a print performed with the WLanguage functions.
  • Reports and Queries by the end user via the report viewer
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.



// 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
// End of print and close the created PDF file
Reports and Queries
Printing a PDF from the report viewer


In the WINDEV applications, the end user can choose the print mode from the report viewer. They can choose to print in PDF format if the "PDF" option is available in the "Export" pane of the report viewer.
In this case, the options defined by iParameterPDF are automatically taken into account.

Event "Before printing the report again"

The event "Before printing the report again" allows you to know the report print mode chosen by the user. In this event, you can configure the PDF file generation options according to the choices made by the user.
Example: When printing via the report viewer, the following code opens a window to request the password of the PDF file to generate:
// -- Event Before printing the report again
IF iDestination = iPDF THEN
sPassword is string = Open(WIN_PDFSetting)
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:
  • 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.
Minimum version required
  • Version 9
This page is also available for…
Click [Add] to post a comment