Chris,

Thanks for the suggestions.

My document contains multiple page sequences. It is my understanding that
<fo:page-number-citation> only works with a single page sequence starting
from page 1, as all it does is give you the number of the last page in the
sequence - not necessarily the total number of pages. That's why I'm using
two passes.

I will try to investigate whether there is a memory leak; in the meantime I
would be grateful if anyone else has any suggestions/ideas.

Thanks again,

Haitham.

-----Original Message-----
From: Chris Bowditch [mailto:[EMAIL PROTECTED]
Sent: 07 August 2003 11:01
To: [EMAIL PROTECTED]
Subject: Re: OutOfMemoryError when PDF is rendered twice


>From: "Al-Dhahir, Haitham" <[EMAIL PROTECTED]>

<snip/>

>What I have found is that my document generates successfully if I only
>create it once; however, what I was originally trying to do was find out 
>the
>total number of pages across all page sequences, therefore I was creating
>the document twice and taking the page count from the driver after the 
>first
>pass. When I use this "two pass" technique, I find that I get an
>OutOfMemoryError. I tried increasing my JVM memory to 256MB, which is the
>size of the RAM on my machine, but still get the same problem.
>

You can insert the total page count into your document using 
<fo:page-number-citation>, so you shouldnt need to do two passes, just for 
that.

>I have read the posts about tables taking up a lot of memory; but can 
>anyone
>explain why it works fine with one pass but fails with two passes? Is the
>original document being held in memory while the new one is being created?
>If so, is this necessary and is there anything I can do in my code to
>prevent this? My code is as follows:
>

The memory occupied by the original document should be GC'd. There is 
probably a memory leak somewhere, possibly in your code or in FOP. Try to 
isolate problem using JProbe or other Java Profiling software.

Sorry I cant offer a better suggestion,

Chris

_________________________________________________________________
Sign-up for a FREE BT Broadband connection today! 
http://www.msn.co.uk/specials/btbroadband


---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to