We are testing out the VeryPDF command line PDF printer in a new environment and we have come up against a major headache.
The software is called D3, which is a relation database environment previous known as PICK.
D3 runs as a service on Windows.
The service is run under the Local System or Local Service account which allows us to run a Windows sub-process and run the PDFPrint command on that.
The PDFPrint command fails due to a lack of privilege on executing the SetDefaultPrinter API call.
If we log into Windows as a Power User we can run PDFPrint directly on a Windows command window and it works.
However running the D3 service under that user will not allow a Windows sub-process to execute.
If we run the D3 service under an administrator account, we can run a Windows sub-process and run PDFPrint successfully.
But the user needs to be an "ad admin" account with a fixed password and the client is not willing to grant an account like that for security reasons.
This leaves us with a Catch-22:
* the account that D3 is normally run under will not run PDFPrint because of the API;
* As a Power User we can run PDFPrint but D3 will not run a sub-process
* And an admin user will do both but is a security risk to the client and so we can't use one on a permanent basis.
I have been in communication with our D3 support, VeryPDF support and the client's IT section trying to get PDFPrint to be usable and I'm getting nowhere all because of that one API call.
Is there any way that PDFPrint can select the printer to print to without getting caught up on that API call?
I do not know why that call should fail under either the Local System or Local Service accounts.
We suggest you may run pdfprint.exe by "VeryPDFComRunCmd COM Component", you may download "VeryPDFComRunCmd COM Component" from this web page to try,
You can configure "VeryPDFComRunCmd COM Component" to run inside Administrator user account, when pdfprint.exe be called from "VeryPDFComRunCmd COM Component", pdfprint.exe will own Administrator privilege automatically.
Please look at following web page about how to configure "VeryPDFComRunCmd COM Component" to run inside Administrator user account,
You can call pdfprint.exe from your source code by following sample code,
set VeryPDFCom = Server.CreateObject("VeryPDFCom.RunCmd")
dim nRetVal, bRet
strRet = VeryPDFCom.RunCmd2("D:\VeryPDF\pdfprint.exe D:\test.pdf", 5)
Response.Write strRet & vbCrlf