I am using the wwPDF class to print to PDF using the Windows Print to PDF printer driver on a Windows Server 2016.
oPDF = CreateObject("wwPdfPrinterDriver")
oPDF.cPrinterDriver = "Microsoft Print to PDF" && the name of the printer
The error I get is: Printing failed: File access is denied d:\temp.mem
Where is it coming up with the d:\temp.mem folder?
Thanks, Bob
Not sure. Is that path correct? D:/temp specifically?
The temp path is set through environment varsity make sure the temp Path is valid...
Rick
Actually the folder it seems to be looking for is "d:\temp.mem" . I don't find that any any system variable..
Also, if I simply print the report to the Microsoft Print to PDF printer, it works and writes the pdf to the desktop.
I feel that it is server or permissions, because on an Azure Terminal Server, it works.
Permissions on the Printer is set to allow Print for Everyone.
I am at a loss as to what to try next.
I don't know either because that file is not generated by Web Connection - it's coming from the PDF driver. Are you running on Azure? I think Azure sets the temp path to the local D: drive which is a impermanent SSD drive attached to a server instance. What are the permissions in that folder (if it exists)?
Where exactly is this happening? On your dev box or a deployed server? Both?
On a server it could be permissions for the application Pool - make sure the AppPool has rights in that folder. You might also have to set the option in the App Pool to use a user profile so that the temp variable is properly set in the environment. However, I don't do that on my server and the Microsoft PDF Driver works in my app (running under Network Service).
+++ Rick ---