PDFPrint Command Line paper tray issue. Why PDFPrint Command Line failed to switch the paper tray on Windows Server 2012 R2 (x64) system?


I used pdfprint.exe on our old Windows Server 2008 (x86) to print out pdfs and selecting the correct paper tray with the -chgbin option and this worked just fine.

Now I migrated this old server to a new Windows Server 2012 R2 (x64) and the pdfprint.exe command works, but the paper tray can't be selected anymore.

I looked at your knowledge base and found some articles on printer permission issues, but this seems not to be the cause of the problem in my case. I launch the pdfprint command in a console window running with Administrator privileges, I gave Administrator(s) full access to the printer, as well as the Everyone user.

Even with the printer completely fully accessible to everyone, the paper tray doesn't change.

I also used the -debug option, but everything seems OK there at first sight.

I'll post you my screenshots to show the problem.

Can you see what could be the problem?

1. Try to retrieve Paper Tray Number from Printer first,


2. Print the PDF file to Windows Printer and select special Paper Tray Number,


3. Show the Properties of target printer,



4. Everyone has enough permission to this printer,



5. The default is A4 paper size,


5. Print the PDF file to this printer from both Adobe Reader and PDFPrint Command Line, view their Document Properties,


Here I did a tryout with the same document (testwdb1.pdf), once printed with Acrobat Reader and once with pdfprint.

The printer queue you see: the first entry (testwdb1 - Copy) is printed with pdfprint (tray selection stays on automatic instead of selecting Tray 2), the second one (testwdb1) with Acrobat Reader (Tray 2 selected).

The printer works fine, but for some reason pdfprint refuses to select the paper tray, even if the printer allow full permissions to admins and everyone.


UPDATE: I did also some further testing with a totally different laser printer from Brother (HL-6050DN). Guess what: paper tray selection works with this printer!

I suspect an issue in the HP Officejet Pro 8100 driver.

One more strange issue: in Acrobat Reader you have two different ways to select the paper tray:

- in the print dialog, you can select the paper tray by going to printer properties at the top of the printer dialog; selecting the tray there prints the PDF via the right paper tray.

- in the print dialog, you have also the possibility to do a page setup with the dialog from Adobe Reader => selecting paper tray here doesn't work!

See my screenshots ...

So there is one way of selecting the paper tray that doesn't work with the HP printer.


Page setup from Adobe Reader (paper tray is not selected this way).



We suggest you may by following steps to adjust margins, duplex, paper size, staple, fold, etc. options,

1. Please run following command line to prompt the user Printer Dialog and save the printer settings to a disk file,

pdfprint.exe -savedevmode D:\printer.dat -printer "Your Printer Name"

2. In the Printer Dialog, you can set following options, such as,

set "Duplex" option to "Top-Top" or others;
set default paper tray to "Tray 3" or others;
set the paper size to "11x17" or others;
set other options that you want;
set staple to "on" or others;
set fold or staple options;

click "OK" to close Printer Dialog, you will get a D:\printer.dat file,

3. Please run following command line to load the devmode from disk file and set it to printer,

pdfprint.exe -loaddevmode D:\printer.dat -printer "Your Printer Name" D:\input.pdf

4. OK, you will able to print your PDF file with correct options.

We hoping above solution will helpful to you, please to try.



Thanks for the hint! I forgot about the savedevmode option and didn't test that way ...

The good news is that it works now with the HP Officejet Pro 8100 too!

Thank you very much.

Kind regards,

VN:F [1.9.20_1166]
Rating: 0.0/10 (0 votes cast)
VN:F [1.9.20_1166]
Rating: 0 (from 0 votes)

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!