[prev in list] [next in list] [prev in thread] [next in thread] 

List:       fop-user
Subject:    Re: Page counting in FOP
From:       "liam grimes" <liamgrimes () gmail ! com>
Date:       2007-03-28 17:53:47
Message-ID: 82f302570703281053u4f7c65fawebcfefb23b9259d8 () mail ! gmail ! com
[Download RAW message or body]

Hi I am not sure if this might help you but look at this post
http://www.stylusstudio.com/xsllist/200412/post70260.html

On 3/28/07, Johan Johansson <jjn@idata.se> wrote:
>
>  Sorry for my last mail, i hit the send short-key by misstake.
>
>
> Is there any way to count pages with the fop except from the
> <fo:page-number/> ?
>
> Because i do it like this:
>
>    <xsl:for-each select="fakturor/fakturabunt/faktura">
>    <!-- Definera variabeln och sätt värde beroende på inbet.kort eller ej
> -->
>    <xsl:variable name="faktura">
>     <xsl:choose>
>      <xsl:when test="skrivbetkort = '1'">faktura</xsl:when>
>      <xsl:otherwise>faktura-helkropp</xsl:otherwise>
>     </xsl:choose>
>    </xsl:variable>
>    <xsl:variable name="flow-height">
>     <xsl:choose>
>      <xsl:when test="skrivbetkort = '1'">8</xsl:when>
>      <xsl:otherwise>17</xsl:otherwise>
>     </xsl:choose>
>    </xsl:variable>
>
>    <!-- Skapa dokument med variabel master -->
>    <fo:page-sequence master-reference="{$faktura}" force-page-count="even"
> initial-page-number="1">
>
> So for each faktura it will start back on number 1 so i can present amount
> of pages for each <faktura>
>
> But i also want to know how many pages the entire document is, so when i
> tried to put fo:page-number in a variable it ends up being empty all the
> time.
>
> Do anyone know how to count pages that are being renderd in fop?
>

[Attachment #3 (text/html)]

Hi I am not sure if this might help you but look at this post <a \
href="http://www.stylusstudio.com/xsllist/200412/post70260.html">http://www.stylusstudio.com/xsllist/200412/post70260.html</a><br><br><div><span \
class="gmail_quote"> On 3/28/07, <b class="gmail_sendername">Johan Johansson</b> \
&lt;<a href="mailto:jjn@idata.se">jjn@idata.se</a>&gt; wrote:</span><blockquote \
class="gmail_quote" style="border-left: 1px solid rgb(204, 204, 204); margin: 0pt 0pt \
0pt 0.8ex; padding-left: 1ex;">






<div>
<div><span><font face="Tahoma" size="2">Sorry for my last 
mail, i hit the send short-key by misstake.</font></span></div>
<div><span><font face="Tahoma" size="2"></font></span>&nbsp;</div>
<div><span><span class="q">
<div><span><font color="#0000ff" face="Arial" size="2"></font></span>&nbsp;</div>
<div><span><font color="#0000ff" face="Arial" size="2">Is 
there any way to count pages with the fop except from the&nbsp; 
&lt;fo:page-number/&gt; ?</font></span></div>
<div><span><font color="#0000ff" face="Arial" size="2"></font></span>&nbsp;</div>
<div><span><font face="Arial"><font color="#0000ff"><font size="2">Because i do it \
like this:<span>&nbsp;</span></font></font></font></span></div> <div><span><font \
face="Arial"><font color="#0000ff"><font \
size="2"><span></span></font></font></font></span>&nbsp;</div></span> \
<div><span><font face="Arial"><font color="#0000ff"><font \
size="2"><span>&nbsp;&nbsp;&nbsp;&lt;xsl:for-each  \
select=&quot;fakturor/fakturabunt/faktura&quot;&gt;<br>&nbsp;&nbsp;&nbsp;&lt;!-- \
Definera  variabeln och sätt värde beroende på inbet.kort eller ej 
--&gt;<br>&nbsp;&nbsp;&nbsp;&lt;xsl:variable 
name=&quot;faktura&quot;&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&lt;xsl:choose&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;xsl:when \
 test=&quot;skrivbetkort = 
&#39;1&#39;&quot;&gt;faktura&lt;/xsl:when&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;xsl \
:otherwise&gt;faktura-helkropp&lt;/xsl:otherwise&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&lt;/x \
sl:choose&gt;<br>&nbsp;&nbsp;&nbsp;&lt;/xsl:variable&gt;<br>&nbsp;&nbsp;&nbsp;&lt;xsl:variable \
 name=&quot;flow-height&quot;&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&lt;xsl:choose&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;xsl:when \
 test=&quot;skrivbetkort = 
&#39;1&#39;&quot;&gt;8&lt;/xsl:when&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;xsl:other \
wise&gt;17&lt;/xsl:otherwise&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&lt;/xsl:choose&gt;<br>&nb \
sp;&nbsp;&nbsp;&lt;/xsl:variable&gt;<br>&nbsp;&nbsp;&nbsp;<br>&nbsp;&nbsp;&nbsp;&lt;!-- \
 Skapa dokument med variabel master 
--&gt;<br>&nbsp;&nbsp;&nbsp;&lt;fo:page-sequence \
master-reference=&quot;{$faktura}&quot;  force-page-count=&quot;even&quot; 
initial-page-number=&quot;1&quot;&gt;</span></font></font></font></span></div>
<div><span><font face="Arial"><font color="#0000ff"><font \
size="2"><span></span></font></font></font></span>&nbsp;</div> <div><span><font \
face="Arial"><font color="#0000ff"><font size="2"><span>So for each faktura it will \
start back on  number 1 so i can present amount of pages for each 
&lt;faktura&gt;</span></font></font></font></span></div>
<div><span><font face="Arial"><font color="#0000ff"><font \
size="2"><span></span></font></font></font></span>&nbsp;</div> <div><span><font \
face="Arial"><font color="#0000ff"><font size="2"><span>But i also want to know how \
many pages the  entire document is, so when i tried to put fo:page-number in a \
variable it ends  up being empty all the \
time.</span></font></font></font></span></div> <div><span><font face="Arial"><font \
color="#0000ff"><font size="2"><span></span></font></font></font></span>&nbsp;</div> \
<div><span><font face="Arial"><font color="#0000ff"><font size="2"><span>Do anyone \
know how to count pages that are  being renderd in 
fop?</span></font></font></font></span></div></span></div></div>
</blockquote></div><br>



[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic