I need a batch program that will do some of what xpp does or equivalent

Jonathan josephj at main.nc.us
Sun Sep 12 18:52:02 PDT 2010


I'm working on my duplex printing emulator for non-duplex printers again.

It works for one printer printing strategy and has a few other cool features like batch duplex printing and some ability to recover partially from paper jams, multi-feeds, and similar problems when printing the second pass.

I did some experimenting with xpp - that amazing utility the Till wrote years ago - and figured out that I could define printer instances for CUPS with the right combination of portrait/reverse portrait, even/odd, forward/reverse order, mirrored. landscape/reverse landscape so that I could print to any printer by just printing the odd pages removing and reinserting them as is or flipped over for some printers (no physical rotation needed)and get perfect two-sided printouts.

There's just one problem:  I want to configure the printing strategy the way HP did cartridge alignment in the past.  I want to print a generic set of test pages (4 for portrait and maybe a two more for landscape - I haven't figured that out yet).  All the user will have to do is answer a few questions about what printed where with which side up.

I can figure that out now, but what I need is a program that can do what xpp does to print things using these transformations, but in a batch command-line mode (which I can invoke automatically from a program written in bash, python, perl, etc. without the need to make the user manually define two or more printer instances for every new printer the user has access to.)

I expect that ghostscript can do all this, but the few invocations I've seen of it have as many parameters as a c compiler step in a make file and are just as difficult to read - let alone write.

Is there something like a batch version of xpp that will transform postscript on the fly or from file to file automatically the way xpp does it - in a way that's not too difficult to master?

Is someone who knows ghostscript willing to set up all the possibilities for me to use (I think it's a set of around 16 possible strategies unless it doubles again for landscape vs. portrait.

I'll still have a substantial piece of work to build the framework that glues the whole thing together into an application and adds the other features that my duplex printing program already has.

Any ideas would be appreciated.

There must be some people interested in saving paper and space.

TIA

Joe




More information about the cups mailing list