Solution 1:

What I do is the following --- it is not as versatile as you asked, but it works almost ok. You need to have all your printers defined, and then you need these two scripts:

  1. stop_printers:

    #!/bin/bash -f
    #
    allp=(`cat /etc/printcap | tr "|" "\t" | cut -f 1 | grep -v "#"`)
    for i in ${allp[@]}; do 
        echo -n Printer $i:
        cupsdisable "$i"
        echo " " paused.
    done
    
  2. start_printers:

    #!/bin/bash -f
    #
    allp=(`cat /etc/printcap | tr "|" "\t" | cut -f 1 | grep -v "#"`)
    for i in ${allp[@]}; do 
        echo -n Printer $i:
        cupsenable "$i"
        echo " " restarted.
    done
    

You have to put them in your path (for example ~/bin) and make them executable with chmod +x. CAVEAT: I do not have any printer with spaces in their names. The scripts are not tested in that case (but I am sure that one of our shell script's gurus will fix the scripts in a flash ;-)... )

Now, you can issue:

[romano:~] % stop_printers
Printer PDF:  paused.
Printer ColorDEA:  paused.
Printer Deskjet_6980:  paused.
Printer fotocop5:  paused.

And you can print from wherever you want, the printer will be paused:

printer from evince

You can see your queue:

[romano:~] % lpq -PDeskjet_6980
Deskjet_6980 is not ready
Rank    Owner   Job     File(s)                         Total Size
1st     romano  439     Bones_3+RG.pdf — Flesh depth  125952 bytes

(AFAIK, the print queues are persistent across reboots). And when you want to print:

[romano:~] % start_printers         
Printer PDF:  restarted.
Printer ColorDEA:  restarted.
Printer Deskjet_6980:  restarted.
Printer fotocop5:  restarted.

Using lprm you can remove a job if you need to; lpr to enqueue a document via command line, and if you want different "lists", no one forbids defining the same printer several times with different names.

You can also resume each printer by hand, it's just a matter of running cupsenable <printername> from the prompt.

What I do not think you can do with this solution is changing the print options after the fact --- you will have to dequeue and re-enqueue the document for this.

Solution 2:

My package (shameless plug), duplexpr does some of what you want and includes bash functions which may be useful in rolling your own version. (It's coded in bash, so it should be relatively easy to modify and I will help if I can.)

It's designed to emulate duplex printing on non-duplex printers and implements its own simple print queue management. It has both gui and cli interfaces.

The current version only prints in duplex and only works with non-duplex printers, but a new version is in the works which will handle printers with duplex hardware which essentially is just printer and queue management without the duplex emulation software. (I have an alpha version available of a script which already works if anyone wants to contact me directly via the project, etc..)

The system prints to the current default printer, but the dplx and duplex scripts accept additional arguments which are passed to lp and can be used to set any options that lp understands such as printer and other properties.

The system currently handles PDF, PostScript, and plain text files.

The one thing it will not do is print files which were created using the Print to File option from within Acroread. Those files just don't work with lp and I have never been able to get the attention of any of the upstream folks to figure out what the problems are.

Personally, I print almost everything "offline" (using the Print to File options which most applications support) even when my printer(s) are available. It helps me concentrate on what I am doing. Later, when I reach a suitable break point, I print batches of jobs.

Having a print queue is also really nice when you want to print another copy of something without having to regenerate it and it's essential for dealing with printer errors like jams or running out of toner.