Re: using multiple page sequences

2004-03-12 Thread John Austin
On Thu, 2004-03-11 at 22:02, Fleetwood, Brett (SSABSA) wrote:
 Hi all,
 
Quick question: Have you increased the memory available to your JVM ?
If you are using the JVM default, your easiest solution might be to
increase the memory available. This depends on your system having enough
real memory to support it and varies by JVM vendor. 

So what is your environment ?

OS, real memory available, Java Version ?


What is your command line used to invoke Fop ? 


 I am having out of memory issues when transforming my FO - PDF using
 fop-0.20.5rc2. I read that using multiple page sequences in the XSL and

There is a production release of 0.20.5

 therefore in the FO means that fop will release some memory. I don't see how
 I can do this. My XML file is generated dynamically from a database so I
 don't know how big it will be. Is there any solutions I can use that uses
 multiple page sequences or possible change the xml structure, if not is
 there another FOP transformer that isn't as memory intensive. Thanks in
 advanced for any help. If I havn't provided enough info please ask and I can
 get back to you.

See above
-- 
John Austin [EMAIL PROTECTED]

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



RE: using multiple page sequences

2004-03-12 Thread Fleetwood, Brett (SSABSA)
Thanks for you response John, hopefully I can answer your questions. From
what I understand, we have a web-based application that uses Linux
Apache-Tomcat as the web-server to do the rendering. This is a decent
machine and we have allocated extra memory (approx 1Gb) but being a web-app
possibly many users can request data to be rendered into PDF at the same
time therefore I need to keep things as small as possible. I'm not sure
throwing more resources at it will ultimately fix it, I think that the
actual XSL needs to change or possibly use a different rendorer.

Has anyone had experience in setting up a machine to solely perform
transformations?

-Original Message-
From: John Austin [mailto:[EMAIL PROTECTED]
Sent: Friday, 12 March 2004 1:01 PM
To: [EMAIL PROTECTED]
Subject: Re: using multiple page sequences


On Thu, 2004-03-11 at 22:02, Fleetwood, Brett (SSABSA) wrote:
 Hi all,
 
Quick question: Have you increased the memory available to your JVM ?
If you are using the JVM default, your easiest solution might be to
increase the memory available. This depends on your system having enough
real memory to support it and varies by JVM vendor. 

So what is your environment ?

OS, real memory available, Java Version ?


What is your command line used to invoke Fop ? 


 I am having out of memory issues when transforming my FO - PDF using
 fop-0.20.5rc2. I read that using multiple page sequences in the XSL and

There is a production release of 0.20.5

 therefore in the FO means that fop will release some memory. I don't see
how
 I can do this. My XML file is generated dynamically from a database so I
 don't know how big it will be. Is there any solutions I can use that uses
 multiple page sequences or possible change the xml structure, if not is
 there another FOP transformer that isn't as memory intensive. Thanks in
 advanced for any help. If I havn't provided enough info please ask and I
can
 get back to you.

See above
-- 
John Austin [EMAIL PROTECTED]

-
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]



Re: using multiple page sequences

2004-03-12 Thread Glen Mazza
Fleetwood, Brett (SSABSA) schrieb:
I read that using multiple page sequences in the XSL and
therefore in the FO means that fop will release some memory. 

The ML archives seem to indicate that, but I'm unsure how significant 
the savings would be.  It might not be worth the effort.  I'm currently 
looking in this area for our newer version (1.0) and hopefully 
band-aids such as these will not be necessary in the future.

Is there any solutions I can use that uses
multiple page sequences or possible change the xml structure, if not is
there another FOP transformer that isn't as memory intensive. 

RenderX and AntennaHouse are the main commercial implementations.
			
fo:layout-master-set
	fo:simple-page-master master-name=A4
	/fo:simple-page-master		
/fo:layout-master-set
		
fo:page-sequence master-reference=contents
 

Hmmm...I guess I'm missing something here--doesn't the master reference 
(contents) need to refer to the master-name of the simple-page-master 
(A4)?

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


RE: using multiple page sequences

2004-03-12 Thread Fleetwood, Brett (SSABSA)
Cheers Glen, Are you on the FOP dev team? Is 1.0 far away? I'll look into
these other implementations. You are right the XSL won't work, I was
originally playing around with page-sequence-master master-name =
contents but removed it as it wasn't useful, and obviously forgot to
change the rest. Thanks again.

bF.

-Original Message-
From: Glen Mazza [mailto:[EMAIL PROTECTED]
Sent: Friday, 12 March 2004 3:07 PM
To: [EMAIL PROTECTED]
Subject: Re: using multiple page sequences


Fleetwood, Brett (SSABSA) schrieb:

I read that using multiple page sequences in the XSL and
therefore in the FO means that fop will release some memory. 

The ML archives seem to indicate that, but I'm unsure how significant 
the savings would be.  It might not be worth the effort.  I'm currently 
looking in this area for our newer version (1.0) and hopefully 
band-aids such as these will not be necessary in the future.

Is there any solutions I can use that uses
multiple page sequences or possible change the xml structure, if not is
there another FOP transformer that isn't as memory intensive. 

RenderX and AntennaHouse are the main commercial implementations.

   
fo:layout-master-set
   fo:simple-page-master master-name=A4
   /fo:simple-page-master
/fo:layout-master-set
   
fo:page-sequence master-reference=contents
  

Hmmm...I guess I'm missing something here--doesn't the master reference 
(contents) need to refer to the master-name of the simple-page-master 
(A4)?

Glen

-
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]



Re: using multiple page sequences

2004-03-12 Thread Glen Mazza
Yes, 1.0 is far away, but we keep working on it.  Every day it's getting 
better formed.

Glen
Cheers Glen, Are you on the FOP dev team? Is 1.0 far away? I'll look into
these other implementations. You are right the XSL won't work, I was
originally playing around with page-sequence-master master-name =
contents but removed it as it wasn't useful, and obviously forgot to
change the rest. Thanks again.
bF.
 


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


Re: using multiple page sequences

2004-03-12 Thread Fabrizio Tringali
Hi Brett,
It's not about faith, spanning datas across multiple page sequences 
brings an huge memory saving.
We solve issue of constant OutOfMemory errors (according to heap 
allocation) going to about 2 MB memory consumption on fully written 100 
pages documents.

You have to identify where in your document could be inserted a page break
or
decide to break intentionally after N rows of datas (1 record on your XML 
file can be M rows on document so M*N is the total rows on document)

In the second case put logic for break when ciclying your datas templates 
using something like this ($STOP is max number of data rows for page):

xsl:for-each select=DATA_ROW[position() mod $STOP = 1]
fo:page-sequence master-reference=YOUR_MASTER_REFERENCE 
initial-page-number=auto
fo:flow flow-name=xsl-region-body
fo:table table-layout=fixed width=480pt
fo:table-column column-width=85pt/
fo:table-column column-width=15pt/
fo:table-body
fo:table-row line-height=30pt
fo:table-cell
fo:block 
text-align=center font-size=10pt font-family=Couriertitle 1/fo:block
/fo:table-cell
fo:table-cell
fo:block 
text-align=center font-size=10pt font-family=Couriertitle 2/fo:block
/fo:table-cell
/fo:table-row
   /fo:table-body
/fo:table
xsl:for-each 
select=.|following-sibling::DATA_ROW[position() lt; $STOP]
xsl:apply-templates select=./
/xsl:for-each
/fo:flow
/fo:page-sequence
/xsl:for-each

xsl:template match=DATA_ROW
fo:table table-layout=fixed width=480pt
fo:table-column column-width=85pt/
fo:table-column column-width=10pt/
fo:table-body
fo:table-row line-height=13pt
fo:table-cell
fo:block text-align=left 
font-size=10pt font-family=Courier
xsl:value-of 
select=YOUR_ROW_KEY_1/
/fo:block
/fo:table-cell
fo:table-cell
fo:block text-align=center 
font-size=10pt font-family=Courier
xsl:value-of 
select=YOUR_ROW_KEY_2/
/fo:block
/fo:table-cell
/fo:table-row
/fo:table-body
/fo:table
/xsl:template

Hope this help
fabrizio
At 02.32 12/03/2004, you wrote:
Hi all,
I am having out of memory issues when transforming my FO - PDF using
fop-0.20.5rc2. I read that using multiple page sequences in the XSL and
therefore in the FO means that fop will release some memory. I don't see how
I can do this. My XML file is generated dynamically from a database so I
don't know how big it will be. Is there any solutions I can use that uses
multiple page sequences or possible change the xml structure, if not is
there another FOP transformer that isn't as memory intensive. Thanks in
advanced for any help. If I havn't provided enough info please ask and I can
get back to you.
Defend your privacy! Encrypt your email today! 
http://www.bytefusion.com/secexmail 

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


RE: using multiple page sequences

2004-03-12 Thread John Austin
On Thu, 2004-03-11 at 23:32, Fleetwood, Brett (SSABSA) wrote:
 Thanks for you response John, hopefully I can answer your questions. From
 what I understand, we have a web-based application that uses Linux
 Apache-Tomcat as the web-server to do the rendering. This is a decent
 machine and we have allocated extra memory (approx 1Gb) but being a web-app
 possibly many users can request data to be rendered into PDF at the same
 time therefore I need to keep things as small as possible. I'm not sure
 throwing more resources at it will ultimately fix it, I think that the
 actual XSL needs to change or possibly use a different rendorer.
 
 Has anyone had experience in setting up a machine to solely perform
 transformations?

I asked about memory on the machine and about the command line arguments
used to invoke your environment as a sanity-check to make sure that your
Java VM (in this case Tomcat ?) is configured with a large enough heap
to support your program. It could explain why your application runs out
of heap. There are reasons WHY it requires this much memory, that we
don't want to go in to here.

Simply plugging in a few memory cards isn't enough. Java has to know the
size of the heap (free store) that it is allowed to create. For the Sun
Java, use the commands: java -j  and java -X to see the options.

In Tomcat 5, you could use the environment variable JAVA_OPTS to pass
in a value for -Xmx, say JAVA_OPTS=-Xmx800M to  allow an 800 Mb heap.

This isn't a perfect solution, but it could help you get to the next
level and keep you alive while you consider your commercial options.

-- 
John Austin [EMAIL PROTECTED]

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