Generic PDF Printer Drivers and wwPdfPrinterDriver
wwPdfPrinterDriver can be used with most PDF printer drivers that are installed into Windows. Windows 10 and Window Server 2016 ship with the
Microsoft Print to PDF driver which now provides a built-in PDF output solution.
This wwPDF implementation handles changing the printer, sending a report to the printer and waiting for the completed PDF file which is printed asynchronously to the printer spooler.
If you're using Windows 10 or Windows Server 2016 or later we recommend you use the Microsoft Print to PDF driver.
We've tested with a few other printer drivers - Nitro, FoxIt - and this driver works with both of them just fine. It should work with any driver that supports printing by redirecting the print spooler. One caveat is that the driver has to be able to run without UI prompts. Some older drivers cannot bypass the file selection dialogs and those will not work. However most newer drivers properly support passthrough file names that are sent as part of the print job.
The following is an example that uses the Microsoft Print to PDF driver.
oPDF=CREATEOBJECT("wwPdfPrinterDriver") *** Specify the printer **name** from your Printer List oPdf.cPrinterDriver = "Microsoft Print to PDF" *** Optional - wait for doc to finish in milliseconds oPdf.nMaxWaitTime = 10000 lcFile = SYS(2023) + "test.pdf" IF !oPDF.PrintReport("custlist.frx",lcFile) ? oPDF.cErrorMsg ENDIF *** Desktop: Open the file and display it * GoUrl(lcFile) *** Web: Download the file from disk to Web clients Response.DownloadFile(lcFile,; "application/pdf",; "CustomerReport.pdf")
- You run only on Windows 10 or Windows 2016+
- Make sure you install
Microsoft Print To PDFPrinter
- Make sure the Printer Spooler Service is running/automatic
- Make sure printer is accessible for other users (Printer Properties->Security then add users)
- Make sure you write PDF files into a folder where you have permissions to write
Note 3rd party PDF printer drivers typically work on older versions. The specs above are for the Microsoft PDF driver.
Comment or report problem with topic