I have a client wanted to know if it’s possible to use PDFPrint to print to a network printer from the command line. Are there any limitations to this, or does it require a local printer in order to function?
Yes, our pdfprint.exe does support network printer, you can use it by following command line,
Pdfprint.exe -printer "\\192.168.1.10\myPrinter" C:\test.pdf
We are getting some errors back from PrintPDF when trying to print. I have included a log with the error numbers below. Can you tell me what's going on?
RCAutoFormsService Verbose: 1 : PrintThread: Waiting for Work.
RCAutoFormsService Verbose: 1 : Queuing Print Job: D:\AVAI\DealTyper\TransactionForms\26\Form22.pdf to \\ryanspc\HP LaserJet 1022 - Ryan, DeleteWhenFinished=False, Copies=1
RCAutoFormsService Verbose: 1 : PrintThread: Work found, Current Queue Length is 1
RCAutoFormsService Verbose: 1 : Printing D:\AVAI\DealTyper\TransactionForms\26\Form22.pdf to \\ryanspc\HP LaserJet 1022 - Ryan
RCAutoFormsService Verbose: 1 : Attempting to start D:\AVAI\DealTyper\App_Data\PDFPrint\pdfprint.exe -$ "56XSD5234455255WET58" -copies 1 -printer "\\ryanspc\HP LaserJet 1022 - Ryan" "D:\AVAI\DealTyper\TransactionForms\26\Form22.pdf"
RCAutoFormsService Verbose: 1 : Waiting up to 60 seconds for process 4640 to terminate
RCAutoFormsService Verbose: 1 : Process Terminated with code: -1001
RCAutoFormsService Verbose: 1 : Process Output: Thank you for choosing our product.
Printing 'D:\AVAI\DealTyper\TransactionForms\26\Form22.pdf' file...
GetPrinterDevice:OpenPrinter("\\ryanspc\HP LaserJet 1022 - Ryan") failed, GetLastError() = 5 Time of printing is: 62ms(0.06s) Exit Code
Please add -debug parameter to printout detailed message, the debug message will helpful for you to find out where is wrong quickly,
Pdfprint.exe -debug -printer "\\192.168.1.10\myPrinter" C:\test.pdf
I seem to be getting back error code 13 from PDF Print. Do you have any indication as to what that error could mean?
Please refer to following values,
0: Print PDF file successfully.
-10: PDFPrint Library is damaged.
-11: Something is wrong in the command line options.
-101: Can't start "spooler" service, please start "spooler" service from Service Manager by manual.
-4: Can't locate specify printer in this computer.
-12: Can't open specify printer.
-13: Something is wrong when set options to printer.
-5: No input PDF file for printing.
9: Password Required to open this PDF file.
Other values: Something is wrong during render PDF file.
"-13" is "Something is wrong when set options to printer.", please give full control to Everyone user account to target Network printer to try again. You can also use IP address to instead of domain name.
We've tried a few things today, but still can't get around this error. We have isolated the error to printers that are being shared by another computer on the network.
Allow me to describe our system:
We have some web services running on a Windows 2008 server with IIS7. We are printing some PDFs with your tool when a user executes a specific command. The printers that are installed directly to the server (I.E. not going through another computer) work great. The printers being shared by another computer don't work. I can print to those printers when I am logged in to the machine, so it seems to only be a problem when trying to have the service execute the print command.
Do you have any additional troubleshooting information that could help us?
"service" hasn't Network connection ability, you need run pdfprint.exe from Administrator user account, then you will get pdfprint.exe work properly.
Please download CmdAsUser from following page to try, you can use CmdAsUser to run pdfprint.exe from Administrator user account,
you can also set your service run as Administrator user account in Service Manager, if you don't know how to do, please feel free to let us know, we will provide the detailed information to you shortly.