Getting tiny jobs to print faster

Jonathan josephj at main.nc.us
Sun Dec 7 19:32:28 PST 2008


I have a bash script that prints files using lp (cups - with bsd extensions on kubuntu hardy).

Occasionally, it (correctly) generates a file with just a formfeed in it to force a page out of the printer (used with my duplex emulation bash scripts to get the last odd page out after all the even sides have printed and there's one odd page left.)

This all works fine, but when it gets to these "formfeed" files it takes a very long time to start printing - around a minute when everything else starts almost immediately.

I have no idea what's really going on, but I guess that it might have something to do with flushing a buffer.  Maybe the file just isn't big enough to get cups to do anything until some timer times out.

The code that actually generates the job is:

echo -n $'\f' | lp

Any ideas on why this might take so long to print or for a better way to do this would be appreciated.






More information about the cups mailing list