Re: [docbook-apps] Enable FOP's PCL duplexing feature with DocBook XSL stylesheet customization?

2017-09-11 Thread Tony Graham

On 08/09/2017 21:57, Warren Young wrote:

On Sep 8, 2017, at 1:33 PM, Jirka Kosek  wrote:


On 7.9.2017 17:46, Warren Young wrote:
Unfortunately, grepping the DBX FO XSL files in the version of 
the stylesheets packaged for my OS turns up no instances of 
“duplex”.


That's because XSL-FO and DocBook stylesheets are dealing with 
formatting and pagination. How these pages are printed onto 
physical paper is out of scope of these technologies.


Yes, XSL 1.1 does talk about the binding edge of a page but sidesteps
actually defining how to either work out or indicate which edge is the
binding edge: https://www.w3.org/TR/xsl11/#fo_page-sequence

FO comes into it because that’s the level where FOP defines the 
feature.  As you say, FO has nothing to do with paper handling, but 
PCL does, and FOP has a PCL output mode.  This feature is therefore 
the only way to communicate this information between the input and 
output (FO and PCL) sides of FOP.


Yes, users can and do ignore the neat separations of scope in the cause
of getting things done.

FWIW, AH Formatter does let you specify duplexing [1] and a few other
things in the FO that are used only when running on Windows and
outputting straight to the printer.  It doesn't generate PCL, though.  I
haven't been able to trace why the feature was initially added.

Also FWIW, control of duplexing, etc., are in the XSL 2.0 Requirements
document [2] (as is specifying the binding edge [3]).

Regards,


Tony Graham.
--
Senior Architect
XML Division
Antenna House, Inc.

Skerries, Ireland
tgra...@antenna.co.jp


[1] https://www.antennahouse.com/product/ahf64/ahf-ext.html#printing
[2] https://www.w3.org/TR/xslfo20-req/#print-specific-properties
[3] https://www.w3.org/TR/xslfo20-req/#N66625

-
To unsubscribe, e-mail: docbook-apps-unsubscr...@lists.oasis-open.org
For additional commands, e-mail: docbook-apps-h...@lists.oasis-open.org



Re: [docbook-apps] Enable FOP's PCL duplexing feature with DocBook XSL stylesheet customization?

2017-09-08 Thread Warren Young
On Sep 8, 2017, at 1:33 PM, Jirka Kosek  wrote:
> 
> On 7.9.2017 17:46, Warren Young wrote:
>> Unfortunately, grepping the DBX FO XSL files in the version of the 
>> stylesheets packaged for my OS turns up no instances of “duplex”.
> 
> That's because XSL-FO and DocBook stylesheets are dealing with
> formatting and pagination. How these pages are printed onto physical
> paper is out of scope of these technologies.

FO comes into it because that’s the level where FOP defines the feature.  As 
you say, FO has nothing to do with paper handling, but PCL does, and FOP has a 
PCL output mode.  This feature is therefore the only way to communicate this 
information between the input and output (FO and PCL) sides of FOP.

> Usually you will produce PDF not PCL

Our application produces both: PDF as the primary document storage mechanism 
plus a paper copy for the files in case of data loss.

Historically, it’s always been a 1-page document, so it’s no biggie to print it.

I now need duplexing because we just added enough new material to the document 
to push it to 2 pages, so I’d like to keep printing it onto a single piece of 
paper.

> and then instruct PDF viewer
> together with print driver to do things like duplex printing, or two
> pages on one sheet printing, etc.

That’s our workaround right now: use gs -dDuplex to render the PDF to PCL 
instead of letting FOP do it.  I was just hoping to get that reprocessing step 
out of the middle.

> it's first time I hear that someone is using
> PCL backend in FOP. ;-)

I’d bet that most printers which can handle both PCL and PS/PDF will render PCL 
much faster than PS/PDF.  PS/PDF just *looks* fast on the desktop where you 
have a multicore multigigahertz box to render that pig. :)
-
To unsubscribe, e-mail: docbook-apps-unsubscr...@lists.oasis-open.org
For additional commands, e-mail: docbook-apps-h...@lists.oasis-open.org



Re: [docbook-apps] Enable FOP's PCL duplexing feature with DocBook XSL stylesheet customization?

2017-09-08 Thread Jirka Kosek
On 7.9.2017 17:46, Warren Young wrote:
> Unfortunately, grepping the DBX FO XSL files in the version of the 
> stylesheets packaged for my OS turns up no instances of “duplex”.

That's because XSL-FO and DocBook stylesheets are dealing with
formatting and pagination. How these pages are printed onto physical
paper is out of scope of these technologies.

Usually you will produce PDF not PCL and then instruct PDF viewer
together with print driver to do things like duplex printing, or two
pages on one sheet printing, etc.

> 3. Maybe there is a trick with XSL customization files to insert arbitrary 
> directives?

There is template setup-pagemaster which you can redefine, or you can
just create additional pagemaster using user.pagemasters template. You
can add pcl:duplex-mode attribute in your customization.

> 4. Prevail on those maintaining the standard DocBook stylesheets to add a way 
> to turn this feature on in a standard way, so that in about a decade’s time 
> when all my machines with outdated docbook-style-xsl RPMs are replaced, I’ll 
> be able to turn it on with a one-line XSL directive. :)

Patches are welcomed. But it's first time I hear that someone is using
PCL backend in FOP. ;-)

-- 
--
  Jirka Kosek  e-mail: ji...@kosek.cz  http://xmlguru.cz
--
 Professional XML and Web consulting and training services
DocBook/DITA customization, custom XSLT/XSL-FO document processing
--
 OASIS DocBook TC member, W3C Invited Expert, ISO JTC1/SC34 rep.
--
Bringing you XML Prague conferencehttp://xmlprague.cz
--



signature.asc
Description: OpenPGP digital signature