W3C home > Mailing lists > Public > www-xsl-fo@w3.org > June 2009

FOP & PS - Print Duplex

From: Kurtz, Simon <sikurtz@ascendone.com>
Date: Fri, 19 Jun 2009 10:41:41 -0400
Message-ID: <DA4E517683AA55479B6A46E6E99712CD0698B449@MAILS4.ad.root>
To: <www-xsl-fo@w3.org>
Hello,

 

I have a potentially multi-page document that I need to render, so that
it will print as duplex in PS. Could anyone point me in the right
direction as to how I can do this, please? Below is my layout if that
helps. I am using FOP 0.94.

 

Thank you!

 

 

<fo:root xmlns:fo="http://www.w3.org/1999/XSL/Format">

            <fo:layout-master-set>

                        <!--We have a different design for the first
page than we do for all following pages. Specifically, the header and
footer differ on the first page.-->

                        <fo:simple-page-master master-name="first-page"
page-height="11in" page-width="8.5in" margin-top="0.45in"
margin-bottom="0.25in" margin-left="0.5in" margin-right="0.5in">

                                    <fo:region-body region-name="body"
margin-bottom="1.35in" margin-top="2.75in"/>

                                    <fo:region-before
region-name="header" extent="2.75in"/>

                                    <fo:region-after
region-name="footer2" extent="1.20in"/>

                        </fo:simple-page-master>

                        

                        <fo:simple-page-master master-name="all-pages"
page-height="11in" page-width="8.5in" margin-top="0.45in"
margin-bottom="0.25in" margin-left="0.5in" margin-right="0.5in">

                                    <fo:region-body region-name="body"
margin-bottom="0.3in" margin-top="0.75in"/>

                                    <!--region-body must be declared
before region-before and region-after-->

                                    <fo:region-before
region-name="header2" extent="0.75in"/>

                                    <fo:region-after
region-name="footer" extent="0.15in"/>

                        </fo:simple-page-master>

                        

                        <fo:page-sequence-master
master-name="my-sequence">

                                    <!--Define the first page to show
and then the page that repeats indefinitely starting with the second
page.-->

                                    <fo:single-page-master-reference
master-reference="first-page"/>

                                    <fo:repeatable-page-master-reference
master-reference="all-pages"/>

                        </fo:page-sequence-master>

            </fo:layout-master-set>

            

            <fo:page-sequence master-reference="my-sequence">

                        <!--Header-->

                        <xsl:call-template name="header"/>
<!--page 1-->

                        <xsl:call-template name="header2"/>
<!--page 2+-->

                        <!--Footer-->

                        <xsl:call-template name="footer"/>
<!--page 1-->

                        <xsl:call-template name="footer2"/>
<!--page 2+-->

                        <!--Body-->        

                        <xsl:call-template name="body"/>
<!--page 1+-->

            </fo:page-sequence>

</fo:root>
Received on Monday, 22 June 2009 08:58:51 GMT

This archive was generated by hypermail 2.2.0+W3C-0.50 : Monday, 22 June 2009 08:58:52 GMT