RE: Servlet stops

2001-10-18 Thread Colin Savage
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 andstart 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



..page header..

...table to fit on one page...



..page header..

...table to fit on one page...




-Original Message-
From: Kuehnberger [mailto:[EMAIL PROTECTED]
Sent: 18 October 2001 11:30
To: [EMAIL PROTECTED]
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


  
  
  




   
   
   


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:[EMAIL PROTECTED]
> Sent: 18 October 2001 09:31
> To: [EMAIL PROTECTED]
> 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:[EMAIL PROTECTED]
> > Sent: 18 October 2001 08:55
> > To: [EMAIL PROTECTED]
> > 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:[EMAIL PROTECTED]
> > > Sent: 18 October 2001 08:40
> > > To: '[EMAIL PROTECTED]'
> > > 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:[EMAIL PROTECTED]
> > > Sent: 17. oktober 2001 17:26
> > > To: [EMAIL PROTECTED]
> > > 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


Re: Servlet stops

2001-10-18 Thread Kuehnberger
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


  
  
  




   
   
   


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:[EMAIL PROTECTED]
> Sent: 18 October 2001 09:31
> To: [EMAIL PROTECTED]
> 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:[EMAIL PROTECTED]
> > Sent: 18 October 2001 08:55
> > To: [EMAIL PROTECTED]
> > 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:[EMAIL PROTECTED]
> > > Sent: 18 October 2001 08:40
> > > To: '[EMAIL PROTECTED]'
> > > 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:[EMAIL PROTECTED]
> > > Sent: 17. oktober 2001 17:26
> > > To: [EMAIL PROTECTED]
> > > 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



RE: Servlet stops

2001-10-18 Thread Colin Savage
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:[EMAIL PROTECTED]
Sent: 18 October 2001 09:31
To: [EMAIL PROTECTED]
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:[EMAIL PROTECTED]
> Sent: 18 October 2001 08:55
> To: [EMAIL PROTECTED]
> 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:[EMAIL PROTECTED]
> > Sent: 18 October 2001 08:40
> > To: '[EMAIL PROTECTED]'
> > 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:[EMAIL PROTECTED]
> > Sent: 17. oktober 2001 17:26
> > To: [EMAIL PROTECTED]
> > 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


Re: Servlet stops

2001-10-18 Thread Kuehnberger
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:[EMAIL PROTECTED]
> Sent: 18 October 2001 08:55
> To: [EMAIL PROTECTED]
> 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:[EMAIL PROTECTED]
> > Sent: 18 October 2001 08:40
> > To: '[EMAIL PROTECTED]'
> > 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:[EMAIL PROTECTED]
> > Sent: 17. oktober 2001 17:26
> > To: [EMAIL PROTECTED]
> > 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



RE: Servlet stops

2001-10-18 Thread Colin Savage
you can have multiple pagesequences in one document

-Original Message-
From: Kuehnberger [mailto:[EMAIL PROTECTED]
Sent: 18 October 2001 08:55
To: [EMAIL PROTECTED]
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:[EMAIL PROTECTED]
> Sent: 18 October 2001 08:40
> To: '[EMAIL PROTECTED]'
> 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:[EMAIL PROTECTED]
> Sent: 17. oktober 2001 17:26
> To: [EMAIL PROTECTED]
> 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


Re: Servlet stops

2001-10-18 Thread Kuehnberger
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:[EMAIL PROTECTED]
> Sent: 18 October 2001 08:40
> To: '[EMAIL PROTECTED]'
> 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:[EMAIL PROTECTED]
> Sent: 17. oktober 2001 17:26
> To: [EMAIL PROTECTED]
> 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



RE: Servlet stops

2001-10-18 Thread Colin Savage
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:[EMAIL PROTECTED]
Sent: 18 October 2001 08:40
To: '[EMAIL PROTECTED]'
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:[EMAIL PROTECTED]
Sent: 17. oktober 2001 17:26
To: [EMAIL PROTECTED]
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




RE: Servlet stops

2001-10-18 Thread Michail Bikoulis
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:[EMAIL PROTECTED]
Sent: 17. oktober 2001 17:26
To: [EMAIL PROTECTED]
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