Duplex printing via PCL or PS

classic Classic list List threaded Threaded
3 messages Options
Reply | Threaded
Open this post in threaded view
|

Duplex printing via PCL or PS

Warren Young
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.
---------------------------------------------------------------------
To unsubscribe, e-mail: [hidden email]
For additional commands, e-mail: [hidden email]

Reply | Threaded
Open this post in threaded view
|

RE: Duplex printing via PCL or PS

Simon Steiner
Hi,

You could try https://xmlgraphics.apache.org/fop/2.2/output.html#pcl-duplex-mode

Thanks

-----Original Message-----
From: Warren Young [mailto:[hidden email]]
Sent: 07 September 2017 03:18
To: [hidden email]
Subject: Duplex printing via PCL or PS

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.
---------------------------------------------------------------------
To unsubscribe, e-mail: [hidden email]
For additional commands, e-mail: [hidden email]



---------------------------------------------------------------------
To unsubscribe, e-mail: [hidden email]
For additional commands, e-mail: [hidden email]

Reply | Threaded
Open this post in threaded view
|

Re: Duplex printing via PCL or PS

Warren Young
On Sep 6, 2017, at 11:38 PM, Simon Steiner <[hidden email]> wrote:
>
> You could try https://xmlgraphics.apache.org/fop/2.2/output.html#pcl-duplex-mode

Wow, I never even thought to check the Features list as if it were a manual.

Maybe that section of the web site should be renamed to Documentation, since that’s really what it is.

For the archives, this feature was added in FOP 1.0.

Unfortunately, I don’t see how we can use it.  We’re not generating FO directly.  Our FO files input to FOP are being generated from DocBook, and grep turns up no “duplex” in the FO section of the standard DocBook XSL stylesheets, so it doesn’t look like an XSL customization could turn it on.

Oh, well, I have my workaround.
---------------------------------------------------------------------
To unsubscribe, e-mail: [hidden email]
For additional commands, e-mail: [hidden email]