You are viewing a plain text version of this content. The canonical link for it is here.
Posted to fop-users@xmlgraphics.apache.org by Warren Young <wa...@etr-usa.com> on 2017/09/07 02:17:37 UTC

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: fop-users-unsubscribe@xmlgraphics.apache.org
For additional commands, e-mail: fop-users-help@xmlgraphics.apache.org


Re: Duplex printing via PCL or PS

Posted by Warren Young <wa...@etr-usa.com>.
On Sep 6, 2017, at 11:38 PM, Simon Steiner <si...@gmail.com> 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: fop-users-unsubscribe@xmlgraphics.apache.org
For additional commands, e-mail: fop-users-help@xmlgraphics.apache.org


RE: Duplex printing via PCL or PS

Posted by Simon Steiner <si...@gmail.com>.
Hi,

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

Thanks

-----Original Message-----
From: Warren Young [mailto:warren@etr-usa.com] 
Sent: 07 September 2017 03:18
To: fop-users@xmlgraphics.apache.org
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: fop-users-unsubscribe@xmlgraphics.apache.org
For additional commands, e-mail: fop-users-help@xmlgraphics.apache.org



---------------------------------------------------------------------
To unsubscribe, e-mail: fop-users-unsubscribe@xmlgraphics.apache.org
For additional commands, e-mail: fop-users-help@xmlgraphics.apache.org