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

List:       fop-user
Subject:    Re: how can override the start fo:page-number in xsl:fo with my number
From:       "robyp7 ." <robyp7 () gmail ! com>
Date:       2015-09-08 11:05:48
Message-ID: CAHq0GtawxZ_mVYehPJLrf5EgDUQ5mEZuidOR3gzjke+myVxnLQ () mail ! gmail ! com
[Download RAW message or body]

yes it works!

Thanks|

2015-09-08 10:16 GMT+02:00 Pascal Sancho <psancho.asf@gmail.com>:

> Hi,
> 
> the right attribute is "initial-page-number".
> And from what I can read in FOP 0.20.5 doc (see [1]), this was implemented.
> Not sure however if it worked perfectly, since FOP redesign (starting
> from v0.9x), 0.20.x remains unmaintained.
> 
> [1]
> https://svn.apache.org/repos/asf/xmlgraphics/fop/tags/fop-0_20_5/src/documentation/content/xdocs/compliance.xml
>  
> 
> 2015-09-08 9:49 GMT+02:00 Marc <Marc.Liste@free.fr>:
> > Hi,
> > You have an attribute start-page-number in the sequence element.
> > I don't know if it's ok in FOP 0.20.5
> > Marc
> > Le 07/09/2015 14:28, robyp7 . a écrit :
> > > 
> > > Hi,
> > > 
> > > i use an old fop lib version 0.20.5
> > > I have an xsl:fo with
> > > 
> > > <fo:blocktext-align="end">
> > > 
> > > _Page number :_<fo:page-number/>
> > > 
> > > </fo:block>
> > > this is in the footer
> > > 
> > > I need to create a PDF with a initial number > 1 and for ex. 10 or 11 or
> > > some other else..
> > > 
> > > So the first page begin with 10, the secondo eith 11 and so..
> > > 
> > > I need to pass this number as parameter from jsp web page to my
> > > bean/java classes that call the fop rendering
> > > 
> > > I implement a CustomRender (it extend the class org
> > > 
> > > 
> <eclipse-javadoc:%E2%98%82=JFXIntegration/C:%5C/Users%5C/portoni%5C/.m2%5C/repository%5C/fop%5C/fop%5C/0.20.5%5C/fop-0.20.5.jar%3Corg>.apache
> 
> > > 
> > > 
> <eclipse-javadoc:%E2%98%82=JFXIntegration/C:%5C/Users%5C/portoni%5C/.m2%5C/repository%5C/fop%5C/fop%5C/0.20.5%5C/fop-0.20.5.jar%3Corg.apache>.fop
> 
> > > 
> > > 
> <eclipse-javadoc:%E2%98%82=JFXIntegration/C:%5C/Users%5C/portoni%5C/.m2%5C/repository%5C/fop%5C/fop%5C/0.20.5%5C/fop-0.20.5.jar%3Corg.apache.fop>.render
> 
> > > 
> > > 
> <eclipse-javadoc:%E2%98%82=JFXIntegration/C:%5C/Users%5C/portoni%5C/.m2%5C/repository%5C/fop%5C/fop%5C/0.20.5%5C/fop-0.20.5.jar%3Corg.apache.fop.render>.Renderer)
> 
> > > and i override tese two method:
> > > 
> > > *public**void*render(Page page, OutputStream outputStream){
> > > 
> > > *throws*IOException, FOPException {
> > > 
> > > 
> > > page.setNumber(pageCount);
> > > 
> > > System.out.println("##@@## Rendering page " + page.getNumber());
> > > 
> > > pageCount++;
> > > 
> > > renderer.render(page, outputStream);
> > > 
> > > }
> > > 
> > > 
> > > *public**void*renderPage(Page page){
> > > 
> > > page.setNumber(pageCount);
> > > 
> > > System.out.println("@@##@@ Rendering page " + page.getNumber());
> > > 
> > > pageCount++;
> > > 
> > > renderer.renderPage(page);
> > > 
> > > }
> > > 
> > > 
> > > but page.setNumber(pageCount); doesn't seem to work!
> > > 
> > > How can I do this work?
> > > 
> > > Thanks in advice!
> > > 
> > > 
> > > Roberto
> > > 
> > > 
> > > 
> > > 
> > 
> > ---------------------------------------------------------------------
> > To unsubscribe, e-mail: fop-users-unsubscribe@xmlgraphics.apache.org
> > For additional commands, e-mail: fop-users-help@xmlgraphics.apache.org
> > 
> 
> 
> 
> --
> pascal
> 
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: fop-users-unsubscribe@xmlgraphics.apache.org
> For additional commands, e-mail: fop-users-help@xmlgraphics.apache.org
> 
> 


[Attachment #3 (text/html)]

<div dir="ltr"><div>yes it works!</div><div><br></div><div>Thanks|</div></div><div \
class="gmail_extra"><br><div class="gmail_quote">2015-09-08 10:16 GMT+02:00 Pascal \
Sancho <span dir="ltr">&lt;<a href="mailto:psancho.asf@gmail.com" \
target="_blank">psancho.asf@gmail.com</a>&gt;</span>:<br><blockquote \
class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc \
solid;padding-left:1ex">Hi,<br> <br>
the right attribute is &quot;initial-page-number&quot;.<br>
And from what I can read in FOP 0.20.5 doc (see [1]), this was implemented.<br>
Not sure however if it worked perfectly, since FOP redesign (starting<br>
from v0.9x), 0.20.x remains unmaintained.<br>
<br>
[1] <a href="https://svn.apache.org/repos/asf/xmlgraphics/fop/tags/fop-0_20_5/src/documentation/content/xdocs/compliance.xml" \
target="_blank" rel="noreferrer">https://svn.apache.org/repos/asf/xmlgraphics/fop/tags/fop-0_20_5/src/documentation/content/xdocs/compliance.xml</a><br>
 <div><div class="h5"><br>
<br>
2015-09-08 9:49 GMT+02:00 Marc &lt;<a \
href="mailto:Marc.Liste@free.fr">Marc.Liste@free.fr</a>&gt;:<br> &gt; Hi,<br>
&gt; You have an attribute start-page-number in the sequence element.<br>
&gt; I don&#39;t know if it&#39;s ok in FOP 0.20.5<br>
&gt; Marc<br>
&gt; Le 07/09/2015 14:28, robyp7 . a écrit :<br>
&gt;&gt;<br>
&gt;&gt; Hi,<br>
&gt;&gt;<br>
&gt;&gt; i use an old fop lib version 0.20.5<br>
&gt;&gt; I have an xsl:fo with<br>
&gt;&gt;<br>
&gt;&gt; &lt;fo:blocktext-align=&quot;end&quot;&gt;<br>
&gt;&gt;<br>
&gt;&gt; _Page number :_&lt;fo:page-number/&gt;<br>
&gt;&gt;<br>
&gt;&gt; &lt;/fo:block&gt;<br>
&gt;&gt; this is in the footer<br>
&gt;&gt;<br>
&gt;&gt; I need to create a PDF with a initial number &gt; 1 and for ex. 10 or 11 \
or<br> &gt;&gt; some other else..<br>
&gt;&gt;<br>
&gt;&gt; So the first page begin with 10, the secondo eith 11 and so..<br>
&gt;&gt;<br>
&gt;&gt; I need to pass this number as parameter from jsp web page to my<br>
&gt;&gt; bean/java classes that call the fop rendering<br>
&gt;&gt;<br>
&gt;&gt; I implement a CustomRender (it extend the class org<br>
&gt;&gt;<br>
&gt;&gt; &lt;eclipse-javadoc:%E2%98%82=JFXIntegration/C:%5C/Users%5C/portoni%5C/.m2%5C/repository%5C/fop%5C/fop%5C/0.20.5%5C/fop-0.20.5.jar%3Corg&gt;.apache<br>
 &gt;&gt;<br>
&gt;&gt; &lt;eclipse-javadoc:%E2%98%82=JFXIntegration/C:%5C/Users%5C/portoni%5C/.m2%5C/repository%5C/fop%5C/fop%5C/0.20.5%5C/fop-0.20.5.jar%3Corg.apache&gt;.fop<br>
 &gt;&gt;<br>
&gt;&gt; &lt;eclipse-javadoc:%E2%98%82=JFXIntegration/C:%5C/Users%5C/portoni%5C/.m2%5C \
/repository%5C/fop%5C/fop%5C/0.20.5%5C/fop-0.20.5.jar%3Corg.apache.fop&gt;.render<br> \
&gt;&gt;<br> &gt;&gt; \
&lt;eclipse-javadoc:%E2%98%82=JFXIntegration/C:%5C/Users%5C/portoni%5C/.m2%5C/reposito \
ry%5C/fop%5C/fop%5C/0.20.5%5C/fop-0.20.5.jar%3Corg.apache.fop.render&gt;.Renderer)<br>
 &gt;&gt; and i override tese two method:<br>
&gt;&gt;<br>
&gt;&gt; *public**void*render(Page page, OutputStream outputStream){<br>
&gt;&gt;<br>
&gt;&gt; *throws*IOException, FOPException {<br>
&gt;&gt;<br>
&gt;&gt;<br>
&gt;&gt; page.setNumber(pageCount);<br>
&gt;&gt;<br>
&gt;&gt; System.out.println(&quot;##@@## Rendering page &quot; + \
page.getNumber());<br> &gt;&gt;<br>
&gt;&gt; pageCount++;<br>
&gt;&gt;<br>
&gt;&gt; renderer.render(page, outputStream);<br>
&gt;&gt;<br>
&gt;&gt; }<br>
&gt;&gt;<br>
&gt;&gt;<br>
&gt;&gt; *public**void*renderPage(Page page){<br>
&gt;&gt;<br>
&gt;&gt; page.setNumber(pageCount);<br>
&gt;&gt;<br>
&gt;&gt; System.out.println(&quot;@@##@@ Rendering page &quot; + \
page.getNumber());<br> &gt;&gt;<br>
&gt;&gt; pageCount++;<br>
&gt;&gt;<br>
&gt;&gt; renderer.renderPage(page);<br>
&gt;&gt;<br>
&gt;&gt; }<br>
&gt;&gt;<br>
&gt;&gt;<br>
&gt;&gt; but page.setNumber(pageCount); doesn&#39;t seem to work!<br>
&gt;&gt;<br>
&gt;&gt; How can I do this work?<br>
&gt;&gt;<br>
&gt;&gt; Thanks in advice!<br>
&gt;&gt;<br>
&gt;&gt;<br>
&gt;&gt; Roberto<br>
&gt;&gt;<br>
&gt;&gt;<br>
&gt;&gt;<br>
&gt;&gt;<br>
&gt;<br>
</div></div>&gt; ---------------------------------------------------------------------<br>
 &gt; To unsubscribe, e-mail: <a \
href="mailto:fop-users-unsubscribe@xmlgraphics.apache.org">fop-users-unsubscribe@xmlgraphics.apache.org</a><br>
 &gt; For additional commands, e-mail: <a \
href="mailto:fop-users-help@xmlgraphics.apache.org">fop-users-help@xmlgraphics.apache.org</a><br>
 &gt;<br>
<span class="HOEnZb"><font color="#888888"><br>
<br>
<br>
--<br>
pascal<br>
<br>
---------------------------------------------------------------------<br>
To unsubscribe, e-mail: <a \
href="mailto:fop-users-unsubscribe@xmlgraphics.apache.org">fop-users-unsubscribe@xmlgraphics.apache.org</a><br>
 For additional commands, e-mail: <a \
href="mailto:fop-users-help@xmlgraphics.apache.org">fop-users-help@xmlgraphics.apache.org</a><br>
 <br>
</font></span></blockquote></div><br></div>



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

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