PC SOFT

ONLINE HELP
FOR WINDEV, WEBDEV AND WINDEV MOBILE

Home | Sign in | English US
  • 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
WINDEVWEBDEV - Server codeReports and QueriesWindowsAjaxUser 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
iPreview(iPDF, "C:\Temp\MyPDF.PDF")
Example 2: Print performed by programming
WINDEVWEBDEV - Server codeReports and QueriesWindowsAjaxUser 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
iPreview(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 required version
  • Version 9
This page is also available for…
Comments
Click [Add] to post a comment