Re: Rotate Region Body for Landscape Pages
Leeloo5e <leeloo5e79-docbook <at> yahoo.de>
2008-07-04 07:44:27 GMT
Hi,
thanks. I changed it and processed again. The appendix is still in portrait
not in landscape.
First processed it with FOP 0.95 beta on Windows-System.
Then processed it with xsltproc to generate a fo and have a look at this.
Finding the page-master-sequence in the fo file
<fo:page-sequence-master
master-name="landscape"><fo:repeatable-page-master-alternatives><fo:conditional-page-master-reference
master-reference="blank"
blank-or-not-blank="blank"/><fo:conditional-page-master-reference
master-reference="landscape-first"
page-position="first"/><fo:conditional-page-master-reference
master-reference="landscape-odd"
odd-or-even="odd"/><fo:conditional-page-master-reference odd-or-even="even"
master-reference="landscape-odd"/></fo:repeatable-page-master-alternatives></fo:page-sequence-master>
But the PDF-Output is still in portrait also when I processed the FO file
again with the latest build of FOP.
Just add role="landscape" to my root article and processed again. Now the
whole pdf output is in landscape ... header and footer still portrait -
thats fine.
The appendix I would like to output in landscape format is inside the root
article and this is still in normal format portrait ... Could be this the
reason? Should I create a separat appendix-file?
Thank you very much.
Best Regards,
Lee
Bob Stayton wrote:
>
> Hi,
> Your customization worked for me. I copied and pasted this into a short
> customization (with one correction: your page-sequence-master was using
> body-odd instead of landscape-odd), and processed it with xsltproc and fop
> 0.95beta. When I put role="landscape" on chapter or appendix, they came
> out
> landscape in the PDF.
>
> You might take a peek inside your fo file to see if you are getting
> "landscape" on the page-sequence. That will tell you if something is
> going
> wrong with the stylesheet instead of fop.
>
> Bob Stayton
> Sagehill Enterprises
> bobs <at> sagehill.net
>
>
> ----- Original Message -----
> From: <leeloo5e79-docbook <at> yahoo.de>
> To: <docbook-apps <at> lists.oasis-open.org>
> Sent: Thursday, July 03, 2008 7:11 AM
> Subject: [docbook-apps] Rotate Region Body for Landscape Pages
>
>
> Hello List,
>
> tried to set up a customized page sequence to rotate a region body. This
> Guide
> (http://www.sagehill.net/docbookxsl/PageDesign.html#LandscapePageSequence)
> was very helpful. So here my customizations:
>
> <xsl:template name="select.user.pagemaster">
> <xsl:param name="element"/>
> <xsl:param name="pageclass"/>
> <xsl:param name="default-pagemaster"/>
>
> <xsl:choose>
> <xsl:when test=" <at> role = 'landscape'">landscape</xsl:when>
> <xsl:otherwise>
> <xsl:value-of select="$default-pagemaster"/>
> </xsl:otherwise>
> </xsl:choose>
> </xsl:template>
>
> <xsl:template name="user.pagemasters">
> <fo:simple-page-master master-name="landscape-first"
> page-width="{$page.width}"
> page-height="{$page.height}"
> margin-top="{$page.margin.top}"
> margin-bottom="{$page.margin.bottom}"
> margin-left="{$margin.left.inner}"
> margin-right="{$page.margin.outer}">
> <xsl:if test="$axf.extensions != 0">
> <xsl:call-template name="axf-page-master-properties">
> <xsl:with-param name="page.master">body-first</xsl:with-param>
> </xsl:call-template>
> </xsl:if>
> <fo:region-body margin-bottom="{$body.margin.bottom}"
> margin-top="{$body.margin.top}"
> reference-orientation="90"
> column-gap="{$column.gap.body}"
> column-count="{$column.count.body}">
> </fo:region-body>
> <fo:region-before region-name="xsl-region-before-first"
> extent="{$region.before.extent}"
> display-align="before"/>
> <fo:region-after region-name="xsl-region-after-first"
> extent="{$region.after.extent}"
> display-align="after"/>
> </fo:simple-page-master>
>
> <fo:simple-page-master master-name="landscape-odd"
> page-width="{$page.width}"
> page-height="{$page.height}"
> margin-top="{$page.margin.top}"
> margin-bottom="{$page.margin.bottom}"
> margin-left="{$margin.left.inner}"
> margin-right="{$page.margin.outer}">
> <xsl:if test="$axf.extensions != 0">
> <xsl:call-template name="axf-page-master-properties">
> <xsl:with-param name="page.master">body-odd</xsl:with-param>
> </xsl:call-template>
> </xsl:if>
> <fo:region-body margin-bottom="{$body.margin.bottom}"
> margin-top="{$body.margin.top}"
> reference-orientation="90"
> column-gap="{$column.gap.body}"
> column-count="{$column.count.body}">
> </fo:region-body>
> <fo:region-before region-name="xsl-region-before-odd"
> extent="{$region.before.extent}"
> display-align="before"/>
> <fo:region-after region-name="xsl-region-after-odd"
> extent="{$region.after.extent}"
> display-align="after"/>
> </fo:simple-page-master>
>
> <fo:simple-page-master master-name="landscape-even"
> page-width="{$page.width}"
> page-height="{$page.height}"
> margin-top="{$page.margin.top}"
> margin-bottom="{$page.margin.bottom}"
> margin-left="{$margin.left.outer}"
> margin-right="{$page.margin.inner}">
> <xsl:if test="$axf.extensions != 0">
> <xsl:call-template name="axf-page-master-properties">
> <xsl:with-param name="page.master">body-even</xsl:with-param>
> </xsl:call-template>
> </xsl:if>
> <fo:region-body margin-bottom="{$body.margin.bottom}"
> margin-top="{$body.margin.top}"
> reference-orientation="90"
> column-gap="{$column.gap.body}"
> column-count="{$column.count.body}">
> </fo:region-body>
> <fo:region-before region-name="xsl-region-before-even"
> extent="{$region.before.extent}"
> display-align="before"/>
> <fo:region-after region-name="xsl-region-after-even"
> extent="{$region.after.extent}"
> display-align="after"/>
> </fo:simple-page-master>
>
> <fo:page-sequence-master master-name="landscape">
> <fo:repeatable-page-master-alternatives>
> <fo:conditional-page-master-reference master-reference="blank"
> blank-or-not-blank="blank"/>
> <fo:conditional-page-master-reference
> master-reference="landscape-first"
> page-position="first"/>
> <fo:conditional-page-master-reference master-reference="body-odd"
> odd-or-even="odd"/>
> <fo:conditional-page-master-reference
> odd-or-even="even">
> <xsl:attribute name="master-reference">
> <xsl:choose>
> <xsl:when test="$double.sided !=
> 0">landscape-even</xsl:when>
> <xsl:otherwise>landscape-odd</xsl:otherwise>
> </xsl:choose>
> </xsl:attribute>
> </fo:conditional-page-master-reference>
> </fo:repeatable-page-master-alternatives>
> </fo:page-sequence-master>
> </xsl:template>
>
> Then I set in my Input-Docbook-XML-File the attribute role to landscape in
> the appendix tag like this
>
> <appendix role="landscape">
>
> Next step was to generate output PDF with FOP 0.95 beta under Win and
> docbook-xsl-1.74.0. Result: Nothing. The appendix and integrated
> informaltable are still in portrait format.
> What is wrong?
>
> The very simplest way is to set orient=land to informaltable and this will
> rotate on page but with overfloating the page border ...
>
> <informaltable orient="land">
>
> Next step is using the PSMI from here
> http://www.cranesoftwrights.com/resources/psmi/index.htm. This changed
> last
> in 2003. Couldn't this included in the Docbook-XSL-Stylesheet?
>
> Any suggestions?
>
> Thanks.
> Best Regards,
> Lee
>
>
>
> __________________________________________________________
> Gesendet von Yahoo! Mail.
> Dem pfiffigeren Posteingang.
> http://de.overview.mail.yahoo.com
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: docbook-apps-unsubscribe <at> lists.oasis-open.org
> For additional commands, e-mail: docbook-apps-help <at> lists.oasis-open.org
>
>
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: docbook-apps-unsubscribe <at> lists.oasis-open.org
> For additional commands, e-mail: docbook-apps-help <at> lists.oasis-open.org
>
>
>
--
--
View this message in context: http://www.nabble.com/Rotate-Region-Body-for-Landscape-Pages-tp18260338p18274560.html
Sent from the docbook apps mailing list archive at Nabble.com.