PDFPrint Command Line error message, OpenPrinter Failed, Return Code 5

Hello,
I'm trying to tell our networked printer what paper size to print out (11x17) using -chgbin or -papersource but I get the following error (using -debug):

'[FAILED] Something is wrong in OpenPrinter(), return code = 5'

The document prints anyway, but it defaults to 8.5x11.

Here are the command lines I'm using:
'pdfprint.exe -debug -chgbin 1 test.pdf'
'pdfprint.exe -debug -papersource "Tray1" test.pdf'

I get the same error with both. Any help would be appreciated.

Thanks,
Customer
---------------------------
This is caused by permission setting on your printer, please add Everyone user account to printer and assign Full Control permission to Everyone user account to try again.

VeryPDF
---------------------------
Thanks for the quick reply. That sounds like the right solution but I'm not able to change printer settings because I'm not the administrator. I was able to find a workaround though, in case anyone else has a similar issue.

I followed the method here to add the network printer as a local printer and it lets me print correctly (not quite sure why).

http://community.spiceworks.com/how_to/show/1994-how-to-set-up-a-network-printer-as-a-local-printer-in-windows

How to Set Up a Network Printer as a Local Printer in Windows 7?

  1. First you will need to know the IP Address or path of the printer you want to install as a local printer.
  2. Second make sure that the printer is turned on and connected to the network
  3. Third you will most likely have to create a new port.
    * Select TCP/IP
    * Type the IP Address into the Hostname or IP Address location
  4. Uncheck the box “Query the printer and automatically select the driver to use”, unless Windows 7 all ready has the drivers, as in the case of say a HP Laserjet 4 printer. In that case you can leave the box checked.
  5. Type the complete file path name to where you have the print drivers stored or browse to them and click OK.
  6. Choose the correct driver for your printer and click next.
    Name your printer or use the default name. I try to keep the names consistent with other printers on the network.
  7. Click next and the printer should go through the install process.

Conclusion

Print a test page to make sure it installed correctly and you are all done.

Thanks again!
Customer

VN:F [1.9.20_1166]
Rating: 9.5/10 (2 votes cast)
VN:F [1.9.20_1166]
Rating: 0 (from 0 votes)
PDFPrint Command Line error message, OpenPrinter Failed, Return Code 5, 9.5 out of 10 based on 2 ratings

Related Posts

Leave a Reply

Your email address will not be published. Required fields are marked *


Verify Code   If you cannot see the CheckCode image,please refresh the page again!