[cups.general] Printing several jobs as one connection

gary carroll garycarroll at charter.net
Wed Mar 22 10:19:05 PST 2006


Johannes Meixner wrote:
> Hello,
> 
> On Mar 21 18:18 Gary Carroll wrote (shortened):
> 
>>I want to set a printer queue to open a connection (socket?) to a printer,
>>send the pages of a job, and not close the socket immediately. If the next job
>>arrives within a set period of time (say, 30 seconds) then the pages of that
>>job should be sent as part of the first job.
>>The idea is that I do not want the job to terminate and the printer to be
>>reset between jobs, as this slows down printing if I am printing a long string
>>of small (one to five page) jobs to a fast printer.
> 
> 
> If all the small files have the same mime type (e.g. all are text/plain
> or whatever there is in /etc/cups/mime.types) it may work for you
> to print them as one file using
>   cat file1 file2 ... fileN | lp -d QUEUE

First, thank you for you input. I have followed your advice and have 
aquired the "CUPS Software Programmers Manual" and will be looking at it 
carefully. CUPS is alien to me so some of the basic concepts are taking 
longer than they should.

Currently:
The jobs are being sent from a Windows machine. Currently they are being 
sent as PCL to another Win system where I redirect the printfile to a 
program that strips out the printable pages and concatenates them to a 
file. When the file either reaches a size limit or sits idle for more 
than a few seconds the concatenated file gets a PCL header and footer 
and is sent to the printer. This is ugly.

I am hoping to get the files as PostScript, RIP them to 300 DPI using 
GhostScript, and combine the bitmaps into a single document (PDF? 
OpenOffice?) which is printed at timeout or xx pages.

I am not concerned about the overhead of the 300 DPI bitmap; most of the 
  pages are color scans of varying resolution. Ripping them to 300 DPI 
b&w halftone will actually reduce the average size.


> In contrast
>   lp -d QUEUE file1 file2 ... fileN
> would start the filters and the backend N times.
> Use "grep Started /var/log/cups/error_log" to see what gets started.
> 
> If "cat file1 file2 ... fileN | lp -d QUEUE" is not possible for you,
> you would have to create a selfmade backend and a "socket"-daemon
> where your backend sends the jobs to the "socket"-daemon which
> keeps the connection to the printer as you like.
> Note that a printjob is finished for the cupsd when the backend
> has finished - i.e. you cannot keep the backend running.
> 
> See the "CUPS Software Programmers Manual":
> "Writing Filters" and "Writing Backends"
> and see the man page "man backend".
> 
> 
> Kind Regards
> Johannes Meixner




More information about the cups mailing list