xmlgraphics-fop-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Chen Yang" <cy...@hrsg.ca>
Subject RE: pagenumbering
Date Wed, 31 Aug 2011 13:20:16 GMT
Hey Theresa,

 

Not sure if this answer your question, 

 

I need to start the page 1 after cover page and Table of contents

 

<xsl:call-template name="insert_cover_page_template"/>

<xsl:call-template name="insert_bookmarks"/>

<xsl:call-template name="insert_table_of_contents_page_template"/>

 

Then I bought in my contents template

<xsl:call-template name="insert_contents_page_template"/>

 

Inside the insert_contents_page_template

 

<xsl:template name="insert_contents_page_template">

          <fo:page-sequence master-reference="A4-landscape"
initial-page-number="1" >  

                  <xsl:call-template
name="insert_page_header-template"/> 

                  <xsl:call-template name="side_bar"/> 

                  <xsl:call-template
name="insert_page_footer_template"/>

             <fo:flow  flow-name="xsl-region-body">

                      <xsl:apply-templates/>

                          <fo:block id="TheVeryLastPage"/>

             </fo:flow>   

          </fo:page-sequence>

</xsl:template>

 

Page number template 

 

  <!-- page number -->

  <xsl:template name="page_number">

     <fo:block-container absolute-position="absolute" top="5mm">

            <fo:block font-family="sans-serif" font-size="7pt"
text-align="right" color="black"     >

            Page <fo:page-number/> of <fo:page-number-citation
ref-id="TheVeryLastPage"/>

            </fo:block>

      </fo:block-container>

  </xsl:template>

 

 

Finally,Insert page number into footer template

 

      <!-- footer -->

    <xsl:template name="insert_page_footer_template">  

        <fo:static-content flow-name="xsl-region-after">   

                                

                        .

                        .

                        .     

      

              <xsl:call-template name="page_number"/>

            

        </fo:static-content>

</xsl:template>

 

Now the "Page 1 of X" will start on the first content page, not on my
cover page or table of contents page.

 

Regards 

 

Chen Yang

 

Programmer / Analyst

HRSG (Human Resource Systems Group)

6 Antares Drive,Phase II Suite 100

Ottawa, ON, K2E 8A9

Tel:        613-745-6605 <tel:613-745-6605>  x 254

Fax:        613-745-4019

Email:     cyang@hrsg.ca <mailto:cyang@hrsg.ca> 

Web:       www.hrsg.ca <http://www.hrsg.ca/> 

 

"Competency-based HR Solutions" 

 

 

From: Theresa Jayne Forster [mailto:theresa@inbrand.co.uk] 
Sent: August-30-11 9:50 AM
To: fop-users@xmlgraphics.apache.org
Subject: pagenumbering

 

I was wondering, how can you change the page numbering on
page-number-citation stuff,

 

We have the requirement of numbering starting on the inside cover as
page 1 not page 2 as currently the front page is classed as page 1. 

 

Is there any way to make the numbering start from 1 on the inside of the
front cover?

 

 

Kindest regards

 


Theresa Forster

Senior Software Developer

 


Mime
View raw message