[cups.general] Re: Accept oder deny printing queues

Jerome Alet alet at librelogiciel.com
Wed Mar 15 05:19:09 PST 2006


On Wed, Mar 15, 2006 at 07:09:55AM -0500, Anonymous wrote:
> >and then capture (Tea4CUPS)
> >all the print jobs by setting a single virtual queue (probably one
> >which will ensure the job is in PostScript if you've got a bunch of
> > different printers, but this is not mandatory) and put them in a
> > directory while at the same time computing the number of pages in
> > them (pkpgcounter) and storing this info, for example, in each
> > file name, along with username and so on...
> 
> Thanks! This is real great, but how do I capture the printjobs with Tea4CUPS and save them in a certain directory? I didn't find a tutorial or instruction for this...

Configure your printqueue to just print to "tea4cups://" (nothing
else is needed) then in tea4cups.conf, just set "keepfiles: yes" 

That's all !

:-)

The files will land into /var/spool/cups/tmp by default, but this is
configurable.

Also if you want more control, do something like this instead in
tea4cups.conf :

--- CUT ---
prehook_capture: /bin/cp $TEADATAFILE /path/to/somewhere/$TEAUSERNAME-$TEAPRINTERNAME-$TEAJOBID-`/usr/bin/pkpgcounter $TEADATAFILE`.prn
--- CUT ---

Then each job will be saved into a filed named after the user's name, printer's name,
job's id and job's size in pages.

The rest of the coding is left as an exercise for the reader(s)

bye

Jerome Alet





More information about the cups mailing list