Using Print To PDF
- New
- Issue
-
Roland Smith
- PowerBuilder
- Monday, 24 February 2025 10:05 PM UTC
I tried printing to PDF like this:
dw_report.Object.DataWindow.Print.PrinterName = "Microsoft Print to PDF"
dw_report.Object.DataWindow.Print.FileName = ls_FileName
dw_report.Print()
It works except that the Print function returns before the printer driver is done with the file.
I then tried replacing the Print() with this:
lul_job = PrintOpen("W2 Forms", False)
li_rc = PrintDataWindow(lul_job, dw_report)
PrintClose(lul_job)
Unfortunately, the PrintOpen prompts for the file name. I'm guessing because the filename property is on the datawindow.
Has anyone had any luck printing to "Microsoft Print to PDF" and being able to process the file once it is done?
Find Questions by Tag
Helpful?
If a reply or comment is helpful for you, please don’t hesitate to click the Helpful button. This action is further confirmation of their invaluable contribution to the Appeon Community.