LinuxQuestions.org
Help answer threads with 0 replies.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Server
User Name
Password
Linux - Server This forum is for the discussion of Linux Software used in a server related context.

Notices


Reply
  Search this Thread
Old 12-26-2017, 04:48 PM   #1
SaintDanBert
Senior Member
 
Registered: Jan 2009
Location: "North Shore" Louisiana USA
Distribution: Mint-20.1 with Cinnamon
Posts: 1,771
Blog Entries: 3

Rep: Reputation: 108Reputation: 108
print job details selecting specific printer


How might I configure CUPS, or something, so that the job details (eg -- page count, need of duplexer, special paper, etc) directs the content to a designated printer queue?

I have two HP multi-function printers. One for small jobs(HP3833) and one beast(HP8600). I can manually select "print here" for each print request. However, I'd like to have a generic queue set as default, and let CUPS or other automation send small jobs to that printer and large jobs to the beast.

I believe that there is some way to make this happen because I used to have this running on Solaris years ago. I don't remember if CUPS was part of the process back then. I don't recall doing a lot of support scripting or other development. What I remember is a queue with some bogus printer name. One used this printer, BOGUS, for all print jobs. As the gears worked, jobs would be selected from the BOGUS queue and sent to either the SMALL queue or the LARGE queue based on the estimated page count.

We played similar tricks to access special papers or features using queues for DUPLEX, LEGAL, TABLOID, or LEDGER. Some of this has been simplified because modern printers select papers automatically. However, there are still reasons why special printer features might need human intervention.

Thanks in advance,
~~~ 0;-Dan
 
Old 12-27-2017, 05:15 AM   #2
michaelk
Moderator
 
Registered: Aug 2002
Posts: 25,680

Rep: Reputation: 5894Reputation: 5894Reputation: 5894Reputation: 5894Reputation: 5894Reputation: 5894Reputation: 5894Reputation: 5894Reputation: 5894Reputation: 5894Reputation: 5894
I don't think cups has a way to estimate page count. Since the default output format from most applications is PDF you could create your own dummy printer/filter to find out the page count from the meta data to select the desired printer. Otherwise I don't know of anyway.

As stated in your OP special features like duplex or special paper can be preset with a printer instance i.e special queue via the lpoptions command
 
Old 12-28-2017, 01:44 PM   #3
SaintDanBert
Senior Member
 
Registered: Jan 2009
Location: "North Shore" Louisiana USA
Distribution: Mint-20.1 with Cinnamon
Posts: 1,771

Original Poster
Blog Entries: 3

Rep: Reputation: 108Reputation: 108
Quote:
Originally Posted by michaelk View Post
I don't think cups has a way to estimate page count. Since the default output format from most applications is PDF you could create your own dummy printer/filter to find out the page count from the meta data to select the desired printer. Otherwise I don't know of anyway.

As stated in your OP special features like duplex or special paper can be preset with a printer instance i.e special queue via the lpoptions command
One issue requires that I have multiple queues associated with the same physical printer. Is this possible?

One issue involves "virtual printer" queues (my words). The target of a virtual printer queue might be a physical printer or it might be another virtual printer queue. Each virtual queue would accomplish some set of filters and processing before passing the job along.

{BLUSH} I know that making paper is old-school, but there are still a huge number of places where paper is required.{/BLUSH} My virtual printer queues would work as well for print-to-PDF or other print-to-file implementations.

Thanks in advance,
~~~ *<;-} Dan
 
Old 12-28-2017, 03:24 PM   #4
michaelk
Moderator
 
Registered: Aug 2002
Posts: 25,680

Rep: Reputation: 5894Reputation: 5894Reputation: 5894Reputation: 5894Reputation: 5894Reputation: 5894Reputation: 5894Reputation: 5894Reputation: 5894Reputation: 5894Reputation: 5894
You can create a dummy printer/filters.


https://en.opensuse.org/SDB:Using_Yo...rint_with_CUPS

I've also created a dummy samba printer with a bash script that filters and selects printers/options. It is used for a legacy application but can be used for anything. I have not tried it on a systemd OS as of yet.

Code:
  [printer]
        comment = printing
        printing= LPRNG
        path = /var/spool/samba
        printable = yes
        print command = /usr/local/bin/print_script %s
 
1 members found this post helpful.
  


Reply

Tags
cups, print queue, spooling



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
[SOLVED] Printer problem: job done but no print validator456 Linux - Newbie 9 06-25-2016 12:01 PM
How to Grab Print Job Details and LOG in AIX Sanju_yumi AIX 2 07-28-2014 06:54 PM
Print job stops, will not print OS: Fedora 16, Printer Samsung ML-2955ND Entwicklung Linux - General 9 05-18-2013 08:00 AM
Text file manipulation: selecting specific lines/columns using awk and print CHARL0TTE Linux - Newbie 2 02-27-2010 02:40 AM
Print job doesn't get to the printer bsnider Linux - Hardware 1 08-04-2003 07:46 PM

LinuxQuestions.org > Forums > Linux Forums > Linux - Server

All times are GMT -5. The time now is 02:54 PM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration