Help | Site Map
Connecting Tech Pros Worldwide
Reply
 
LinkBack Thread Tools
  #1  
Old October 9th, 2008, 09:25 PM
Newbie
 
Join Date: Oct 2008
Posts: 2
Default XSL-FO Page Numbering

I need help generating a PDF output where the page numbering restarts at 1 with every new chapter in a document. So the output would look something like 1-1, 1-2, 1-3,..., 2-1, 2-2, 2-3,...

I'm able to capture the chapter number and generate the "1-"; however, all my attempts generate consecutive page numbering (1-1, 1-2, 1-3, 2-4, 2-5, ...).

I suspect I'm not doing something correctly in setting up either the fo:page-sequence-master or the fo:page-sequence.

Could someone please enlighten me with some general guidance?

Thanks.

Craig
Reply
  #2  
Old October 9th, 2008, 09:57 PM
Dormilich's Avatar
Expert
 
Join Date: Aug 2008
Location: Leipzig, Germany
Age: 31
Posts: 649
Default

I've not yet worked with xsl-fo but a quick look at the specs hint that maybe the formatting-properties (CSS) can help you there. especially this one.

regards
Reply
  #3  
Old October 9th, 2008, 10:56 PM
Newbie
 
Join Date: Oct 2008
Posts: 2
Default

Thanks for the suggestion. I'm already familiar with initial-page-number. My challenge is trying to reset the number for each new chapter. My fo:page-sequence looks like this:

<fo:page-sequence master-reference="body-page" initial-page-number="1" force-page-count="even" >

<fo:static-content flow-name="odd-before">
<xsl:call-template name="odd-header-content"/>
</fo:static-content>
<fo:static-content flow-name="even-before">
<xsl:call-template name="even-header-content"/>
</fo:static-content>
<fo:static-content flow-name="odd-after">
<xsl:call-template name="odd-footer-content"/>
</fo:static-content>
<fo:static-content flow-name="even-after">
<xsl:call-template name="even-footer-content"/>
</fo:static-content>

<fo:flow flow-name="xsl-region-body" font-size="10pt" >

<xsl:apply-templates select="dita/topic[@audience != $att_suppress or not(@audience)]"/>

</fo:flow>
</fo:page-sequence>

But, this creates one long continuous sequence of pages. How do I restart page numbering for each new chapter?

Craig
Reply
Reply

Bookmarks

Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are Off
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On

What is Bytes?

We are a network of experts and professionals in IT and software development that help one another with answers to tough questions and share insights. Get the best answers to your questions from over network members.
Post your question now . . .
It's fast and it's free

Popular Articles