[xep-support] Problem with the page numbers

Alexander Peshkov peshkov at renderx.com
Fri Jan 21 03:19:07 PST 2005


Hello Neha,

You can use two page-masters: one for odd pages and another for even
pages. In the static-contents for both page-masters you can have three
cell table with middle cell containing center-aligned text while
fo:page-number will be placed in the left cell in one static-content
and in the right cell in another one.
Another option is to use trick with negative space-before. Something
like this:
    <fo:static-content flow-name="xsl-region-before" font-size="12pt">
        <fo:block text-align="center">HEADING TEXT</fo:block>
        <fo:block text-align="outside" space-before="-14.4pt">Page <fo:page-number/></fo:block>
    </fo:static-content>

will make your outside-aligned and centered text to be visually
situated on the same line.

Best regards,
Alexander Peshkov                             mailto:peshkov at renderx.com
RenderX


NG> Hi,

NG> Thanks for the solution. I used the
NG> text-align="outside" and it is working fine. But I
NG> have a problem with the alignment. I have to display a
NG> page number and some text in header in same line. The
NG> text should always come in the center of the page and
NG> page number should adjust automatically on the let and
NG> right sides. Pls. advise.

NG> ********************************************************************************************************
NG>  <xsl:template name="header">
NG>     <fo:block  text-align="outside" font-family="Times
NG> Roman" font-size="10pt">
NG>      <fo:page-number/>
NG>     </fo:block>
NG>     <fo:block text-align="center" font-family="Times
NG> Roman" font-size="10pt">
NG>      <xsl:value-of select="reporttype"/>
NG>     </fo:block>
NG>     <fo:block text-align="center" font-family="Times
NG> Roman" font-size="10pt">
NG>      <xsl:value-of select="reportdate"/>
NG>     </fo:block>
NG>   </xsl:template>  
NG> ********************************************************************************************************

NG> Thanks,
NG> Neha
NG> --- Michael Sulyaev <msulyaev at renderx.com> wrote:

>> Hello Neha,
>> 
>> Wednesday, December 22, 2004, 1:19:27 AM, you wrote:
>> NG> Hi,
>>  
>> NG> I wish to display the page numbers on the basis
>> of the even odd pages. If the page in publication is
>> coming on the left side the page number should come
>> on the left top and for the right hand
>> NG> side pages i.e even pages the page number should
>> come on the right top.
>> 
>> Put the <fo:page-number/> element in a block with
>> text-align="inside"
>> into a static-content, that refers to
>> xsl-region-before.
>> 
>> See a short example attached.
>> 
>> NG> Thanks,
>> NG> Neha Parab
>> 
>> -- 
>> Best regards,
>>  Michael                           
NG> mailto:msulyaev at renderx.com

>> ATTACHMENT part 2 application/octet-stream
NG> name=text-align-inside.fo




                
NG> __________________________________ 
NG> Do you Yahoo!? 
NG> The all-new My Yahoo! - What will yours do?
NG> http://my.yahoo.com 
NG> -------------------
NG> (*) To unsubscribe, send a message with words 'unsubscribe xep-support'
NG> in the body of the message to majordomo at renderx.com from the address
NG> you are subscribed from.
NG> (*) By using the Service, you expressly agree to these Terms of Service http://www.renderx.com/tos.html


-------------------
(*) To unsubscribe, send a message with words 'unsubscribe xep-support'
in the body of the message to majordomo at renderx.com from the address
you are subscribed from.
(*) By using the Service, you expressly agree to these Terms of Service http://www.renderx.com/tos.html



More information about the Xep-support mailing list