Hello,
I am searching to print PDF file directly from Command Line and get this VeryPDF site. After checking the documentation my question is can we mention Tray number in the command line to print PDF file from the printer directly.
If this option is available then please help me how to write the tray number in the command line.
Based on your reply we can test and if we get any positive then we have remaining requirements and we can use this tool with a license.
Customer
--------------------------------------
https://www.verypdf.com/app/pdf-print-cmd/index.html
Thanks for your message, you can use following options to list Tray numbers from a printer,
-listprinter : list printers in system
-listprinterdriver : list printer driver for a printer
-listbins : list bins/trays of a printer
-listjobs : list print jobs in printer's queue
-listall : list printers, ports, monitors etc.
-listpapers : list supported papers from a printer.
-chgbin <int> : change bin/tray for printer by number
-papersource <string> : change bin/tray for printer by name
You can use following command lines to print a PDF file to a tray on a printer,
pdfprint.exe -listprinter
pdfprint.exe -listjobs -printer "docPrint"
pdfprint.exe -listall
pdfprint.exe -listbins -printer "docPrint"
pdfprint.exe -listpapers -printer "docPrint"
pdfprint.exe -chgbin 15 -printer "docPrint" C:\input.pdf
pdfprint.exe -papersource "auto" -printer "docPrint" C:\input.pdf
pdfprint.exe -papersource "Tray 1" -printer "docPrint" C:\input.pdf
pdfprint.exe -papersource "Manual Feed" -printer "docPrint" C:\input.pdf
pdfprint.exe -papersource "Media Tray" -printer "docPrint" C:\input.pdf
pdfprint.exe -papersource "Tray 3" -settraytopclfile C:\test.pcl
VeryPDF
--------------------------------------
Dear VeryPDF Team,
Thank you for sharing the commands. Today morning after searching the sites I had also got the same and try with the trial version of PDF Print. Our objective is to print a PDF file from a specific tray of the printer. In our organization we have HP3015PS model (HP Laser jet Printer) having 3 trays i.e. Manual Feed (Tray 1),Tray 2 and Tray 3. However we had a previous experience of printing programmatically prn and pcl files from specific tray mentioned by the program. But now there is a requirement to print PDF directly through command prompt for which we are searching this utility.
From the documentation we have used the below command,
pdfprint.exe -papersource "Tray 1" -printer "\\\HP3015PS" C:\abc.pdf
after entering the command in command prompt PDF got printed from Tray 1 (Manual feed) from our printer. We have got Very PDF watermark as we are using now trial version.
But next to check the print out of same PDF file from different tray of same printer I had changed the command like below
pdfprint.exe -papersource "Tray 2" -printer "\\\HP3015PS" C:\abc.pdf
But now after execute this command we saw that the printer first checks Tray 1 (MF) and red light is blinking. But when I click on OK button of the printer then the PDF got print out from Tray 2.
so my question is how we got the print out without do any kind of manual work in printer itself. Please guide us.
next we try with same command using Tray 2 and printer first prompt Tray 1 has a paper or not. Now I open tray 1 i.e Manual Feed and put a paper in MF and the print out took place from Manual feed but the command is given Tray 2 not tray 1.
So if this concern is overcome then our requirement will be satisfied. Please guide us how to overcome from this situation.
Regards
Customer
--------------------------------------
Thanks for your message. PDFPrint Command Line supports "-savedevmode" and "-loaddevmode" options, you can use these options to print the PDF files from different trays.
You may by following steps to adjust nUp, margins, duplex, paper size, staple, fold, tray (paper source), etc. options,
1. Please run following command line to prompt the user Printer Dialog and save the printer settings to a disk file, one data file for one tray,
pdfprint.exe -savedevmode D:\printer-tray1.dat -printer "Your Printer Name"
pdfprint.exe -savedevmode D:\printer-tray2.dat -printer "Your Printer Name"
2. In the Printer Dialog, you can set following options, such as,
set cutting operations on printers such as an Epson label printer, Options in the driver are "cut each page" or "cut each job" or "do not cut",
set nUp option to printer,
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 option,
set double sided printing option,
set tray (paper source) option,
set dithering option,
specify the paper "type", for example: Plain, High Quality, Color Specific, Coated GL, Coated ML, Coated GO and Coated MO, etc.
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-tray1.dat -printer "Your Printer Name" D:\input.pdf
pdfprint.exe -loaddevmode D:\printer-tray2.dat -printer "Your Printer Name" D:\input.pdf
4. OK, you will able to print your PDF file with correct options.
We hope above solution will helpful to you, please to try.
VeryPDF
--------------------------------------
Dear Team,
Thank you for the support. Now it is working properly. I have executed the below command,
pdfprint.exe -loaddevmode D:\printer-tray1.dat -printer "Your Printer Name" D:\input.pdf
printer property window is open. Then I set papersource as Tray 1 from Automatic selection and papersize as 'A4' from 'Letter' and click OK button then file become save.
Good Solution!
Regards
Customer