Print from Specific Tray with LPR Command

372 Views Asked by At

I am using a PHP exec function to run an LPR command on the server, in order to print a PDF generated by a web application. This is so that the web app can print files for the user without them needing to go through the browser print dialog and adjust settings. Only one network printer is being used.

So far, I can successfully auto-print through the client's browser by executing an LPR command through PHP when the page is loaded. The problem is the page needs to be printed through a specific tray with special paper. Is there any way to do this?

I have tried adjusting the printer settings to default to this tray, but it always prints from the manual feed. Also I should note that the PHP is running on Windows Server 2012.

0

There are 0 best solutions below