PC SOFT

WINDEVWEBDEV AND WINDEV MOBILE
ONLINE HELP

Home | Sign in | English UK
  • Overview
  • Printing a programmed print
  • Printing a WLanguage print in PDF format
  • Notes
  • Examples
  • Printing a PDF from the print preview
  • Principle
  • Event "Before printing the report again"
  • Notes and limitations
  • Notes
  • General advice
  • Availability of controls in the reports
  • Control in RTF format
  • Image control
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 print preview.
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.

Notes

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 print preview

Principle

In the WINDEV applications, the end user can choose the print mode from the print preview. He can choose to print in PDF format if the "PDF" option is available in the "Export" pane of the print preview.
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: During the print via the print preview, the following code opens a window asking for 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: During the print via the print preview, the following code opens a window asking for 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: During the print via the print preview, the following code opens a window asking for 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

Notes

    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 the 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 the 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 the RTF controls.

    Image control

    • A white margin appears if the image does not occupy the entire control in "homothetic image" mode.
    • The transparency of images is ignored. The image is printed on a white background.
    Minimum version required
    • Version 9
    This page is also available for…
    Comments
    Click [Add] to post a comment