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

List:       fop-user
Subject:    RE: Servlet stops
From:       Colin Savage <CSavage () RUBICO ! COM>
Date:       2001-10-18 9:47:04
[Download RAW message or body]

If you can't break the table into smaller tables, then the only option you
have ( if you assume that the text in each cell is not going to overflow and
create more than one row) is calculate how many rows will fit on a page,
specify the row height and    start a new table for each page sequence. You
could allow some space at the bottom of each page in case the text in a cell
does overflow. 

Other than that...I can't think of any other solutions

<!-- snip -->
<fo:page-sequence master-name="simple">
	<fo:static-content>..page header..</fo:static-content>
	<fo:flow>
		...table to fit on one page...
	</fo:flow>
</fo:page-sequence>
<fo:page-sequence master-name="simple">
	<fo:static-content>..page header..</fo:static-content>
	<fo:flow>
		...table to fit on one page...
	</fo:flow>
</fo:page-sequence>
<!-- snip -->

-----Original Message-----
From: Kuehnberger [mailto:Kuehnberger@web.de]
Sent: 18 October 2001 11:30
To: fop-user@xml.apache.org
Subject: Re: Servlet stops


Thanks a lot Colin,

now I just have the problem, that the data to display is not really
separable.
Basicly the whole pdf page is one big table .
So how can I define a page sequences for that, so after every 1-2 pages a
new
page-sequence is called.
I tried something like

<fo:simple-page-master master-name="simple" page-height="29.7cm"
page-width="21cm" margin-top="0.5cm" margin-bottom="2cm" margin-left="1.5cm"
margin-right="1.5cm">
      <fo:region-body margin-top="1cm" />
      <fo:region-before extent="3cm" />
      <fo:region-after extent="1.5cm" />
</fo:simple-page-master>

<fo:page-sequence-master master-name="contents">
        <fo:repeatable-page-master-alternatives>
           <fo:conditional-page-master-reference  master-name="simple"
odd-or-even="even"/>
           <fo:conditional-page-master-reference master-name="simple"
odd-or-even="odd"/>
       </fo:repeatable-page-master-alternatives>
</fo:page-sequence-master>

but that didn't make it.


Colin Savage schrieb:

> It's the way that fop processes the doc.
> Basically it keeps grabbing memory...
> a) until you reach the limit of the JVM (i.e. outofmemoryerror fix by
> starting java with -Xms64M -Xmx320M)
> or
> b) until you reach the limit of physical ram available (then the OS starts
> paging to virtual memory i.e. it hangs)
> or
> c) until the end of a page sequence where most of the objects in memory
for
> that page sequence are released, then it starts again
>
> As a general rule of thumb, every fo:tag in your document results in an
> object in memory. The trick is to not have all of them in memory at the
same
> time.
> I have generated 2000 page documents with multiple page sequences of 1 or
2
> pages, and the memory usage didn't go above 18megs
>
> -----Original Message-----
> From: Kuehnberger [mailto:Kuehnberger@web.de]
> Sent: 18 October 2001 09:31
> To: fop-user@xml.apache.org
> Subject: Re: Servlet stops
>
> How can multiple pagesequences help?
> I mean at the end I still got one fo to render, or am I totally wrong?
>
> Colin Savage schrieb:
>
> > you can have multiple pagesequences in one document
> >
> > -----Original Message-----
> > From: Kuehnberger [mailto:Kuehnberger@web.de]
> > Sent: 18 October 2001 08:55
> > To: fop-user@xml.apache.org
> > Subject: Re: Servlet stops
> >
> > Maybe I could, but then how can I send multiple documents if I just got
> one
> > outputstream for my servlet,
> > or is something like
> >
> >     Driver driver = new Driver();
> >     driver.setRenderer( Driver.RENDER_PDF );
> >     try {
> >       driver.setOutputStream( outputstream );
> >       driver.render( document );
> >     }
> >
> >     byte[] content + = outputstream.toByteArray();
> >
> > in a while loop possible?
> >
> > Colin Savage schrieb:
> >
> > > The other common problem is long page sequences, if you can break your
> > > document into multiple page sequences of about 10 to 20 pages, there
is
> > > quite a significant performance improvement
> > >
> > > -----Original Message-----
> > > From: Michail Bikoulis [mailto:Michail.Bikoulis@ementor.no]
> > > Sent: 18 October 2001 08:40
> > > To: 'fop-user@xml.apache.org'
> > > Subject: RE: Servlet stops
> > >
> > > Hello,
> > >
> > > I'm not sure if this helps but when I convert documents running FOP
with
> > the
> > > Java command from an MS-DOS window I use the parameters
> > >
> > > -Xms64M -Xmx320M
> > >
> > > which allocate enough memory for large documents. Is there something
> > similar
> > > you can do in a servlet?
> > >
> > > Regards,
> > >
> > > Mike
> > >
> > > -----Original Message-----
> > > From: Kuehnberger [mailto:Kuehnberger@web.de]
> > > Sent: 17. oktober 2001 17:26
> > > To: fop-user@xml.apache.org
> > > Subject: Servlet stops
> > >
> > > Hi,
> > >
> > > I'm using fop to generate pdf in a servlet.
> > > It works fine until the size of the pdf become bigger then 20 pages (I
> > > have to process files of 200-300 pages).
> > > Then the servlet will stop when I render the document doc:
> > >
> > > driver.render( doc );
> > >
> > > and after some time I get 'page can not be displayed' or
> > > java.lang.OutOfMemoryError (I got 512MB RAM).
> > >
> > > Can somebody tell me how to render big documents on the server.
> > >
> > > Jens

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

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