How to call PDFPrint Command Line from Windows Scheduler or Windows Service to print PDF files to network printer? When I tried to call pdfprint.exe from Windows Service application, it couldn't locate my network printer, how to solve this problem?
Customer
----------------------------------
https://www.verypdf.com/app/pdf-print-cmd/try-and-buy.html#buy
Thanks for your message. It seems you are running pdfprint.exe inside an non-interactive user account, because some network printers are not accessible from non-interactive user account or LocalSystem user account, you have to run pdfprint.exe inside an normal user account in order to access to the network printers, thanks for your understanding.
You can use runas.exe to run pdfprint.exe inside an normal user account instead of default LocalSystem user account or non-interactive user account.
If you are call pdfprint.exe from a script or your application, your script or application should be ran inside an administrator user account, just like you login under administrator user account, and type the command line in CMD window by manual.
You can't call pdfprint.exe command line from scheduler, service, etc. applications which run inside the non-interactive user account, because the non-interactive user account can't access to network printers.
You may also use CmdAsUser.exe to switch the user account (switch from local system user account to normal user account), you may download CmdAsUser.exe from this web page,
https://www.verydoc.com/exeshell.html#CmdAsUser_Command_Line_Tool
VeryPDF
----------------------------------
Please send me an example how to use this in powershell. I can print using some printers, but not all...
I need fast help how to modify script to print again. Worked fine with other printers, this one is not working!!!
Regards,
Customer
----------------------------------
You may give full control permission to Everyone user account to "ET0021B7219675" printer to try again, if you still have same problem, you may download CmdAsUser.exe from this web page,
https://www.verydoc.com/exeshell.html#CmdAsUser_Command_Line_Tool
and run following command line to try again,
CmdAsUser.exe Administrator . /p YourPassword /c "D:\VeryPDF\pdfprint.exe" -debug -printer "ET0021B7219675" D:\test.pdf
Please use correct password in above command line.
If you encounter 1314 error message, please look at the solution at below,
https://www.verydoc.com/exeshell.html#EXEShell_COM_Library
VeryPDF
----------------------------------
Worked. thanks!
Customer