You are viewing a plain text version of this content. The canonical link for it is here.
Posted to fop-users@xmlgraphics.apache.org by Balaji Loganathan <ba...@yahoo.com> on 2002/06/05 10:47:22 UTC
Re: Again out of Memory Error -2
My xsl snippet.
<xsl:template match="/">
<fo:root>
<fo:layout-master-set>
...
</fo:layout-master-set>
<fo:page-sequence master-reference="...">
<fo:static-content>
...
<fo:static-content>
<fo:flow>
<!-- Table start -->
<!-- Table header -->
<xsl:for-each select="codetest/detail">
<!-- Table rows -->
<xsl:value-of select="group"/> ...
..
</xsl:for-each>
<!-- Table end -->
</fo:flow>
</fo:page-sequence>
</fo:root>
</xsl:template>
my Xml snippet:
<codetest>
<detail>
<group/>
<id/>
<sector/>
<quantity/>
<level/>
.....
.....
<ANSI/>
</detail>
</codetest>
Please give me some tips on going for multiple page
sequence.I'm having 1488 rows.
--- Cyril Rognon <cr...@objectiva.fr> wrote: > I
suppose you are using FOP 0.20.3...
> Do you use as many page sequences as you can ?
>
> Long tables and long page sequences are known to
> increase the memory
> requierments of FOP.
> error has nothing to do with xml. Xsl could be used
> to create additionnal
> page sequences. List Archive shows you how.
http://www.sold.com.au - The Sold.com.au Big Brand Sale
- New PCs, notebooks, digital cameras, phones and more ... Sale ends June 12
Re: executing fop with ant
Posted by Magnus Sjöberg <ma...@secode.com>.
This question really belongs on the ant-user mailing list.
Byt anyways, what you want is the <uptodate> task, this link
http://jakarta.apache.org/ant/manual/CoreTasks/uptodate.html
contains an example that should fit your needs.
hth ///
Magnus Sjöberg
ludovic.maurillon@saros.fr wrote:
>
> Hi,
>
> I have in my application a set of FO file, that i have to convert in PDF. I
> would like to do this with ant. so i wrote those lines:
>
> <apply executable="fop" os="Linux" dest="${build.src}">
> <srcfiles/>
> <targetfiles/>
> <fileset dir="${src.dir}">
> <patternset>
> <include name="**/*.fo"/>
> </patternset>
> </fileset>
> <mapper type="glob" from="*.fo" to="*.pdf"/>
> </apply>
>
> that runs pretty well. My problem is that when i execute this, it re-create all
> the pdf each time, even if the .fo had not been update! I would like to notify
> to my apply tag that: if the .fo didn't change, don't create the .pdf. In fact,
> I just want to do the same as <javac>, that doesn't compile the .java if it
> still the same.
> Do you follow me ?
> Is there anyone having the same problem?
> thanks for helping,
>
> Ludo.
>
> ------------------------------------------------------------------------
> Webmail Saros: http://webmail.saros.fr
executing fop with ant
Posted by lu...@saros.fr.
Hi,
I have in my application a set of FO file, that i have to convert in PDF. I
would like to do this with ant. so i wrote those lines:
<apply executable="fop" os="Linux" dest="${build.src}">
<srcfiles/>
<targetfiles/>
<fileset dir="${src.dir}">
<patternset>
<include name="**/*.fo"/>
</patternset>
</fileset>
<mapper type="glob" from="*.fo" to="*.pdf"/>
</apply>
that runs pretty well. My problem is that when i execute this, it re-create all
the pdf each time, even if the .fo had not been update! I would like to notify
to my apply tag that: if the .fo didn't change, don't create the .pdf. In fact,
I just want to do the same as <javac>, that doesn't compile the .java if it
still the same.
Do you follow me ?
Is there anyone having the same problem?
thanks for helping,
Ludo.
------------------------------------------------------------------------
Webmail Saros: http://webmail.saros.fr
Re: Again out of Memory Error -2
Posted by Balaji Loganathan <ba...@yahoo.com>.
Hi Cyril,
Thanks a lot for replying.
I'm using Tomcat 3.2,so I think there shd be
someway to imporve JVM heap size.
Now I understood the multiple page sequence
advantage.I tried to change my to have XSLT to print
20 rows at a time,still coding/re-coding my XSLT to
get a good result and not yet completed.
Since this is a one-off job,I converted my large XML
data to HTML,then I converted HTML to PDF using Adobe
distiller.So the task is done,but I'm half baked now
with my XSLT code.
Thanks a lot for replying me at right time.
Regards
Balaji
--- Cyril Rognon <cr...@objectiva.fr> wrote: > Ok
I'll try to answer both part 1 and 2 here :
>
> as for the JVM memory parameter with servlet engines
> : Your servlet engine
> is executed in a JVM that must allow you to set
> memory parameters. I don't
> know about every ServletEngine or ApplicationServers
> but you can do this
> with Tomcat or Websphere so I guess it exists
> everywhere.
>
> As for multiple page sequences, it is simply a fact
> that the current FOP
> implementation seems to keep a whole page sequence
> in memory before it
> writes it down. So the biggest bage sequence you
> have, the more heap size
> you need.
>
> Therefore it can be helpfull to create separate page
> sequence anytime you
> can. In your case, it is the worst situation : one
> long table. You have to
> start and stop the table each time you want to
> change page-sequence. Some
> guy on the list had the same situation to deal with.
> He manage to have an
> average number of x row per pages. Then he twisted
> his XSLT stylesheet to
> take x rowData (detail element in your case) to
> build one page sequence
> containing one table with the x rows and so on.
>
> He has ended with a 97 page-sequence document. This
> may be a little extreme
> but it works. The archive pointer I gave you does
> this trick.
>
> In many case, you have to deal with many tables wich
> are not always 100
> pages long then you can place page-sequences every
> time you know you can
> have a page break.
>
> I hope this helps.
>
> Cyril
>
http://www.sold.com.au - The Sold.com.au Big Brand Sale
- New PCs, notebooks, digital cameras, phones and more ... Sale ends June 12
Re: Again out of Memory Error -2
Posted by Cyril Rognon <cr...@objectiva.fr>.
Ok I'll try to answer both part 1 and 2 here :
as for the JVM memory parameter with servlet engines : Your servlet engine
is executed in a JVM that must allow you to set memory parameters. I don't
know about every ServletEngine or ApplicationServers but you can do this
with Tomcat or Websphere so I guess it exists everywhere.
As for multiple page sequences, it is simply a fact that the current FOP
implementation seems to keep a whole page sequence in memory before it
writes it down. So the biggest bage sequence you have, the more heap size
you need.
Therefore it can be helpfull to create separate page sequence anytime you
can. In your case, it is the worst situation : one long table. You have to
start and stop the table each time you want to change page-sequence. Some
guy on the list had the same situation to deal with. He manage to have an
average number of x row per pages. Then he twisted his XSLT stylesheet to
take x rowData (detail element in your case) to build one page sequence
containing one table with the x rows and so on.
He has ended with a 97 page-sequence document. This may be a little extreme
but it works. The archive pointer I gave you does this trick.
In many case, you have to deal with many tables wich are not always 100
pages long then you can place page-sequences every time you know you can
have a page break.
I hope this helps.
Cyril