PC SOFT

WINDEVWEBDEV AND WINDEV MOBILE
ONLINE HELP

Home | Sign in | English UK
  • Example 1: Printing a report created with the report editor
  • Example 2: Print performed by programming
iParameterPDF (Example)
Example 1: Printing a report created with the report editor
WINDEVWindowsUser code (UMC)
The following example is used to print a report created with the report editor. The created PDF file is password protected
// The PDF file is password protected
iParameterPDF("My password")
// Create the PDF file
iDestination(iPDF, "C:\Temp\MyPDF.PDF")
Example 2: Print performed by programming
WINDEVWindowsUser code (UMC)
The following example is used to print a report created via the print functions. The created PDF file is password protected.
// In this example, the password is "password"
iParameterPDF("opening", "password", iProtectionPrinting + iProtectionSelection)
 
// Create the PDF file
iDestination(iPDF, "MyPDF.PDF")
 
// Print code
iCreateFont(1, 16, iBold, iRoman)
iPrintWord("First line of my PDF" + CR + "Second line of my PDF" + ...
CR + "Last line of my PDF")
 
// End of print and close the created PDF file
iEndPrinting()
 
// Display the PDF
ShellExecute(iLastFile())
Minimum version required
  • Version 9
This page is also available for…
Comments
Click [Add] to post a comment