PC SOFT

ONLINE HELP
 WINDEVWEBDEV AND WINDEV MOBILE

Home | Sign in | French EN
This content has been translated automatically. Click here to view the French version.
  • 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 format
WINDEV
WindowsLinuxUniversal Windows 10 AppJavaReports and QueriesUser code (UMC)
WEBDEV
WindowsLinuxPHPWEBDEV - Browser code
WINDEV Mobile
AndroidAndroid Widget iPhone/iPadApple WatchUniversal Windows 10 AppWindows Mobile
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:
  • 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 with iEndPrinting.

Remarks

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()
Reports and Queries
Printing a PDF from the report viewer

Principle

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.
Versions 21 and later

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)
iParameterPDF(sPassword)
END
New in version 21

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)
iParameterPDF(sPassword)
END

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)
iParameterPDF(sPassword)
END
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 format

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.
Versions 17 and later
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.
New in version 17
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.
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…
Comments
Click [Add] to post a comment