You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
We're trying to use PrintNode as a hub on our web projct. Each user's default printer is recorded onto DB and we would like to call this printer directly.
However, getPrinter lists all printers and I have to select inside it. Instead of that, it should be like "getPrinters(123456)" and only printer with id :123456 may be detailed.
Thanks.
The text was updated successfully, but these errors were encountered:
If you're using the "release/2.0.0" branch then you can use the method viewPrinters and specify a list of printers that you want to return as the third parameter.
I have also just checked, the main branch code also allows you to return one printer only exactly as you state above. Only thing is the parameter is a string:
$printers = $request->getPrinter('123456');
Just a short note on thomas very useful contribution, it should be:
$printers = $request->getPrinters('123456');
the missing 'S' in Printers left me scratching my head for a while because it did not work,
after that line I added: $printJob->printer = $printers[0];
and then it worked perfectly, thank you very much Thomas!
We're trying to use PrintNode as a hub on our web projct. Each user's default printer is recorded onto DB and we would like to call this printer directly.
However, getPrinter lists all printers and I have to select inside it. Instead of that, it should be like "getPrinters(123456)" and only printer with id :123456 may be detailed.
Thanks.
The text was updated successfully, but these errors were encountered: