Print from Specific Tray with LPR CommandHow do I parse command line arguments in Bash?Is there an equivalent of 'which' on the Windows command line?How can I pretty-print JSON in a shell script?What's the simplest way to print a Java array?How do I check if a string contains a specific word?How do I set a variable to the output of a command in Bash?How to print to stderr in Python?How to copy a folder from remote to local using scp?How to import an SQL file using the command line in MySQL?Is there a way to specify paper tray when using the lpr command to print PDF files through Windows batch scripting?

How can I support myself financially as a 17 year old with a loan?

Theorem won't go to multiple lines and is causing text to run off the page

60s (or earlier) SF short story with FTL Travel using electron psychology aka addiclenendar technology

Where can I go to avoid planes overhead?

Why is C# in the D Major Scale?

Identifying my late father's D&D stuff found in the attic

How did Arya get her dagger back from Sansa?

Sub query result is 0

Am I getting DDOS from crawlers?

Does this article imply that Turing-Computability is not the same as "effectively computable"?

Number of seconds in 6 weeks

Should one double the thirds or the fifth in chords?

What does this colon mean? It is not labeling, it is not ternary operator

Besides the up and down quark, what other quarks are present in daily matter around us?

What is a "listed natural gas appliance"?

Selecting a secure PIN for building access

How to 'Let Go' in Meditation?

Manager is threatning to grade me poorly if I don't complete the project

Is this homebrew life-stealing melee cantrip unbalanced?

When and why did journal article titles become descriptive, rather than creatively allusive?

In Avengers 1, why does Thanos need Loki?

How can I close a gap between my fence and my neighbor's that's on his side of the property line?

Can fracking help reduce CO2?

A non-technological, repeating, phenomenon in the sky, holding its position in the sky for hours



Print from Specific Tray with LPR Command


How do I parse command line arguments in Bash?Is there an equivalent of 'which' on the Windows command line?How can I pretty-print JSON in a shell script?What's the simplest way to print a Java array?How do I check if a string contains a specific word?How do I set a variable to the output of a command in Bash?How to print to stderr in Python?How to copy a folder from remote to local using scp?How to import an SQL file using the command line in MySQL?Is there a way to specify paper tray when using the lpr command to print PDF files through Windows batch scripting?






.everyoneloves__top-leaderboard:empty,.everyoneloves__mid-leaderboard:empty,.everyoneloves__bot-mid-leaderboard:empty height:90px;width:728px;box-sizing:border-box;








1















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.










share|improve this question






















  • Am I missing something or is this not at all a programming related question, since you are asking a question about LPR functionality?

    – ArSeN
    Mar 22 at 22:07

















1















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.










share|improve this question






















  • Am I missing something or is this not at all a programming related question, since you are asking a question about LPR functionality?

    – ArSeN
    Mar 22 at 22:07













1












1








1








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.










share|improve this question














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.







php command-line printing exec lpr






share|improve this question













share|improve this question











share|improve this question




share|improve this question










asked Mar 22 at 20:04









user350813user350813

134




134












  • Am I missing something or is this not at all a programming related question, since you are asking a question about LPR functionality?

    – ArSeN
    Mar 22 at 22:07

















  • Am I missing something or is this not at all a programming related question, since you are asking a question about LPR functionality?

    – ArSeN
    Mar 22 at 22:07
















Am I missing something or is this not at all a programming related question, since you are asking a question about LPR functionality?

– ArSeN
Mar 22 at 22:07





Am I missing something or is this not at all a programming related question, since you are asking a question about LPR functionality?

– ArSeN
Mar 22 at 22:07












0






active

oldest

votes












Your Answer






StackExchange.ifUsing("editor", function ()
StackExchange.using("externalEditor", function ()
StackExchange.using("snippets", function ()
StackExchange.snippets.init();
);
);
, "code-snippets");

StackExchange.ready(function()
var channelOptions =
tags: "".split(" "),
id: "1"
;
initTagRenderer("".split(" "), "".split(" "), channelOptions);

StackExchange.using("externalEditor", function()
// Have to fire editor after snippets, if snippets enabled
if (StackExchange.settings.snippets.snippetsEnabled)
StackExchange.using("snippets", function()
createEditor();
);

else
createEditor();

);

function createEditor()
StackExchange.prepareEditor(
heartbeatType: 'answer',
autoActivateHeartbeat: false,
convertImagesToLinks: true,
noModals: true,
showLowRepImageUploadWarning: true,
reputationToPostImages: 10,
bindNavPrevention: true,
postfix: "",
imageUploader:
brandingHtml: "Powered by u003ca class="icon-imgur-white" href="https://imgur.com/"u003eu003c/au003e",
contentPolicyHtml: "User contributions licensed under u003ca href="https://creativecommons.org/licenses/by-sa/3.0/"u003ecc by-sa 3.0 with attribution requiredu003c/au003e u003ca href="https://stackoverflow.com/legal/content-policy"u003e(content policy)u003c/au003e",
allowUrls: true
,
onDemand: true,
discardSelector: ".discard-answer"
,immediatelyShowMarkdownHelp:true
);



);













draft saved

draft discarded


















StackExchange.ready(
function ()
StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fstackoverflow.com%2fquestions%2f55307072%2fprint-from-specific-tray-with-lpr-command%23new-answer', 'question_page');

);

Post as a guest















Required, but never shown

























0






active

oldest

votes








0






active

oldest

votes









active

oldest

votes






active

oldest

votes















draft saved

draft discarded
















































Thanks for contributing an answer to Stack Overflow!


  • Please be sure to answer the question. Provide details and share your research!

But avoid


  • Asking for help, clarification, or responding to other answers.

  • Making statements based on opinion; back them up with references or personal experience.

To learn more, see our tips on writing great answers.




draft saved


draft discarded














StackExchange.ready(
function ()
StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fstackoverflow.com%2fquestions%2f55307072%2fprint-from-specific-tray-with-lpr-command%23new-answer', 'question_page');

);

Post as a guest















Required, but never shown





















































Required, but never shown














Required, but never shown












Required, but never shown







Required, but never shown

































Required, but never shown














Required, but never shown












Required, but never shown







Required, but never shown







Popular posts from this blog

Kamusi Yaliyomo Aina za kamusi | Muundo wa kamusi | Faida za kamusi | Dhima ya picha katika kamusi | Marejeo | Tazama pia | Viungo vya nje | UrambazajiKuhusu kamusiGo-SwahiliWiki-KamusiKamusi ya Kiswahili na Kiingerezakuihariri na kuongeza habari

Swift 4 - func physicsWorld not invoked on collision? The Next CEO of Stack OverflowHow to call Objective-C code from Swift#ifdef replacement in the Swift language@selector() in Swift?#pragma mark in Swift?Swift for loop: for index, element in array?dispatch_after - GCD in Swift?Swift Beta performance: sorting arraysSplit a String into an array in Swift?The use of Swift 3 @objc inference in Swift 4 mode is deprecated?How to optimize UITableViewCell, because my UITableView lags

Access current req object everywhere in Node.js ExpressWhy are global variables considered bad practice? (node.js)Using req & res across functionsHow do I get the path to the current script with Node.js?What is Node.js' Connect, Express and “middleware”?Node.js w/ express error handling in callbackHow to access the GET parameters after “?” in Express?Modify Node.js req object parametersAccess “app” variable inside of ExpressJS/ConnectJS middleware?Node.js Express app - request objectAngular Http Module considered middleware?Session variables in ExpressJSAdd properties to the req object in expressjs with Typescript