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 David L <dl...@mrv.com> on 2009/01/30 21:56:28 UTC

Re: Page Numbering wooes (FOP to PDF)

Hi all,

I also had Nancy's issues below, and replies didn't seem to address the
numbering.
This is my first month with DocBook, so my compromise may not be elegant.
The key to my compromise is the $pageclass exclusion tests.

I haven't succeeded with applying Roman numerals consistently to the opening
pages (DocBook bugs?), so I opted to remove all page numbering through the
TOC and begin with continuous Arabic numbering thereafter.  I do not yet use
appendices. My numbering is in the footer center, but the code should be
transferable. I hope I've not skipped some other relevant lines. Placing the
number in the center is also sort of a 'cheat' for my double-sided format,
but my left/right entries behave well unless I try to suppress blank pages.
Suppressing these blanks with force.page.count removes the page but the page
sequence skips the number from the unprinted page and my headers and footers
reverse sides! GRRR!

    <xsl:param name="initial.page.number">1</xsl:param>  <!-- top of fo.xsl
-->

<!--within header or footer template -->
        <xsl:when test="$position='center' and $pageclass!='titlepage' and
$pageclass!='lot'">
          <fo:page-number/>
        </xsl:when>

I'd love to hear if this post helps anyone, or if I'm missing some curse
still beyond my experience and horizon.

David L


nancy_b wrote:
> 
> Hi folks,
> 
> Currently, I am struggling with Docbook's page numbering mechanism. My PDF
> document (created using XSLTPROC and FOP 0.94)  has a front coverpage that
> basically is a customized titlepage-first page. After the coverpage comes
> a legal notice, TOC and a Part. Here are the problems I have:
> 
> 1) The legal notice page and its subsequent blank page have a numbering (2
> and 3 respectively). Then there is another blank page and a TOC page with
> numbered with a Roman number (v).
> 
> 2) The first page of Part (where the part's title appears) is numbered
> with (1) and its subsequent blank page has no numbering at all!!! :-( the
> next pages are OK).
> 
> In my print.xsl I have the following code:
> <!--Customizing header content for book format-->
> <xsl:template name="header.content"> 
>   <xsl:param name="pageclass" select="''"/>
>   <xsl:param name="sequence" select="''"/>
>   <xsl:param name="position" select="''"/>
>   <xsl:param name="gentext-key" select="''"/>
> ....
> ....
> <fo:block> 
>     <!-- sequence can be odd, even, first, blank -->
>     <!-- position can be left, center, right -->
>     <xsl:choose>
>      
>       <xsl:when test="$double.sided!=0 and $pageclass='lot' and
> $position='right'">
>         <fo:page-number/>
>       </xsl:when>
> 
>       <xsl:when
>     test="$double.sided!=0 and $pageclass='lot' and $sequence='blank' and
>     $position='left'">
>         <fo:page-number/>
>       </xsl:when>
>      
>       <xsl:when
>     test="$double.sided!=0 and $pageclass='body' and $sequence='blank' and
> $position='left'">
>         <fo:page-number/>
>       </xsl:when>
> 
>       <xsl:when test="$double.sided!=0 and $pageclass='body' and
> $sequence='even' and $position='left'"> 
>         <fo:page-number/>
>       </xsl:when>
> 
>       <xsl:when
>     test="$double.sided!=0 and $pageclass='body'and ($sequence='odd' or
> $sequence='first') and
>     $position='right'">
>     <fo:page-number/>
>       </xsl:when>
> 
>       <xsl:when test="$double.sided!=0 and $sequence='odd'
>         and $position='right'"> 
>         <fo:retrieve-marker retrieve-class-name="section.head.marker" 
>                             retrieve-position="first-including-carryover"
>                             retrieve-boundary="page-sequence"/>
>       </xsl:when>
> 
> 
>       <xsl:when test="$double.sided!=0 and $sequence='even' and
> $position='left'">
>         <fo:retrieve-marker retrieve-class-name="section.head.marker" 
>                             retrieve-position="first-including-carryover"
>                             retrieve-boundary="page-sequence"/>
>       </xsl:when>
> 
>       <xsl:when test="$double.sided=0 and $pageclass='body'
>         and $sequence !='first' and $position='center'">
>         <xsl:apply-templates select="." mode="titleabbrev.markup"/>
>       </xsl:when>
>     </xsl:choose>
>   </fo:block>
> </xsl:template>
> 
> Could anyone tell me PLEASE, what have caused the above problems, and how
> to solve them.
> 
> Thank you all in advance!!!
> 
> best wishes,
> nancy
> 

-- 
View this message in context: http://www.nabble.com/Page-Numbering-wooes-%28FOP-to-PDF%29-tp21220535p21755399.html
Sent from the FOP - Users mailing list archive at Nabble.com.


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