Duplex printing via PCL or PS

Warren Young <[email protected]>
Newsgroups gmane.text.xml.fop.user
Message-ID <[email protected]>
I needed to duplex-print the output of fop, so I came up with this heavy-handed solution:

    $ fop -q -fo x.fo -pdf - |
      gs -sDEVICE=pxlmono -dDuplex -q -o - |
      nc $myprinter 9100

The changes necessary to make that work for PS output should be obvious.

A much more lightweight solution would be for FOP to emit the necessary printer code within the PCL or PS output, rather than send it through Ghostscript to be completely reprocessed.  It could be tied to a new command line option, e.g. -duplex=long.

I tried sending the PCL code to enable long-edge duplexing to the printer before sending the fop -pcl output to the printer, but it didn’t have any effect, apparently because the fop -pcl output resets the printing mode somehow.

(See: http://www.pclviewer.com/resources/reference/)

I’m posting for two reasons:

1. To get my heavy-handed solution out into the world.

2. To try and get someone interested in implementing my lightweight alternative.  Ideally, both PCL and PS outputs would get this feature, but if it’s only one, we’d prefer PCL, since it renders faster on most printers.
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.