[CLUE-Tech] Compensating for insufficient printer memory
Keith Hellman
khellman at mcprogramming.com
Mon Jul 19 11:14:41 MDT 2004
On Sat, Jul 17, 2004 at 01:19:39PM -0600, Matt Gushee wrote:
>
> Is there a way to configure the spooler to split up large jobs into
> chunks that the printer can handle? I'm using CUPS, and its manual
> doesn't seem to address this issue; I could switch to LPR or LPRng
> if absolutely necessary.
gs can take a -sOutputFile switch with "%d" that will generate separate
ps files for each input file. If you set the output device to
postscript, I believe this would separate the pages out into independent
print jobs.
Using this, you could simply write a quicky sh/py/ruby/perl script to
push to-be-printed ps files through (the script would break the large ps
apart and print each page separately on your 1mb printer).
A more sophisticated approach would be to install said script as the
filter (cups supports filters right? the old LP systems used to) of a
virtual printer. This would ease the work in printing to the laser
from multiple machines, or from apps such as a browser or oo - you'd
just set the correct default printer.
A slick way (although I cannot gaurantee it would work) is to create
'forward-1page' filter, have it set up and watch named pipes in a temp
location, oh say a thousand or so with correctly formatted names (they
only cost one inode each). The actual piping operation would be a
direct 'cat' to your hp1mb printer spool. The filter for the virtual
printer would simply invoke gs on the output with the correctly formated
-sOutputFile parameter. You'd need some sort of locking mechanism if
you want multiple jobs at one time (or configure the filter to
pre-launch the 'forward-1page' with a param for uniq temp names, and
make 'forward-1page' smart enough to timeout and quit) This would
prevent you from requiring 2x (theoretical) the amount of diskspace for
queued files. Actually if the ps overhead for one page is > one page of
output data, your gonna end up paying the [disk space] piper in the long
run.
Just the rantings of a certified mad man, but it may spark a solution.
--
Keith Hellman #include <disclaimer.h>
khellman at mcprogramming.com from disclaimer import standard
public key @ www.mcprogramming.com
"Wit ought to be a glorius treat, like caviar. Never spread it about like
marmalade."
-- Noel Coward
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 189 bytes
Desc: Digital signature
Url : http://cluedenver.org/pipermail/clue-tech/attachments/20040719/07163c59/attachment.bin
More information about the clue-tech
mailing list