Re: OutOfMemoryException

2004-08-11 Thread Bernd Brandstetter
On Tuesday 10 August 2004 23:03, Johannes Franz wrote:
 The pngs are the lowest sized images i can get. If i increase the
 memory, which is allocated for java to the size that is necessary for
 the amount of images, my system really slows down and nearly hangs up.
 Is there perhaps an option to force fop to delete the imagecache?
 Because without such an option it is not possible to create pdfs with a
 really big size of images.

I had a similar problem some time ago when I tried to create a PDF 
containing hundreds of SVG images. I finally got it to work by disabling 
image caching completely by commenting out the line 267
m_urlMap.put(href, imageInstance); in FopImageFactory.java (fop-0.20.5)

It would be nice if the next version of fop could provide a means to either 
turn off image caching (as a configuration option) or to limit the cache 
size.

Regards,
Bernd

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



Re: OutOfMemoryException

2004-08-11 Thread J.Pietschmann
Bernd Brandstetter wrote:
I had a similar problem some time ago when I tried to create a PDF 
containing hundreds of SVG images. I finally got it to work by disabling 
image caching completely by commenting out the line 267
m_urlMap.put(href, imageInstance); in FopImageFactory.java (fop-0.20.5)

This wont help much (and probably even hurt) for most bitmap image
formats, because the associated PDF XObject which also refers to the
pixel array hangs around until the PDF object dictionary is written,
which is just before the result stream is finished. Unfortunately
this can't be changed easily in the 0.20.x branch.
It would be nice if the next version of fop could provide a means to either 
turn off image caching (as a configuration option) or to limit the cache 
size.
The redesigned code apparently discards pixel information after it
is written to the result stream, and it also supports reuse of
PDF objects better, so this may be actually implemented. Note that
limiting the cache size can lead to unexpected behaviour for
dynamically generated images.
J.Pietschmann
-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]


Re: OutOfMemoryException

2004-08-11 Thread Johannes Franz
I thin i will try it nevertheless, because i don't know what to do
otherwise. I really need to create a pdf which contains a lot of images.
Do you have any other solutions for my problem?

- Original Message -
From: J.Pietschmann [EMAIL PROTECTED]
To: [EMAIL PROTECTED]
Sent: Wednesday, August 11, 2004 9:18 PM
Subject: Re: OutOfMemoryException


 Bernd Brandstetter wrote:
  I had a similar problem some time ago when I tried to create a PDF
  containing hundreds of SVG images. I finally got it to work by disabling
  image caching completely by commenting out the line 267
  m_urlMap.put(href, imageInstance); in FopImageFactory.java
(fop-0.20.5)
 
 This wont help much (and probably even hurt) for most bitmap image
 formats, because the associated PDF XObject which also refers to the
 pixel array hangs around until the PDF object dictionary is written,
 which is just before the result stream is finished. Unfortunately
 this can't be changed easily in the 0.20.x branch.

  It would be nice if the next version of fop could provide a means to
either
  turn off image caching (as a configuration option) or to limit the cache
  size.

 The redesigned code apparently discards pixel information after it
 is written to the result stream, and it also supports reuse of
 PDF objects better, so this may be actually implemented. Note that
 limiting the cache size can lead to unexpected behaviour for
 dynamically generated images.

 J.Pietschmann

 -
 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: OutOfMemoryException

2004-08-11 Thread J.Pietschmann
Johannes Franz wrote:
I thin i will try it nevertheless, because i don't know what to do
otherwise. I really need to create a pdf which contains a lot of images.
Do you have any other solutions for my problem?
Try JPEG. It shouldn't require as much ressources as PNG.
Bump up physical memory of the machine, 1G or 1.5G, and
allocate as much as possible for the JVM. Disable swapping.
Using JPEG and wrap it in an SVG might help too.
J.Pietschmann
-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]


Re: OutOfMemoryException

2004-08-11 Thread Johannes Franz
The problem with JPEG is, that it really supersizes my pdf. But i'll try it.
THX sofar.
- Original Message -
From: J.Pietschmann [EMAIL PROTECTED]
To: [EMAIL PROTECTED]
Sent: Wednesday, August 11, 2004 9:41 PM
Subject: Re: OutOfMemoryException


 Johannes Franz wrote:

  I thin i will try it nevertheless, because i don't know what to do
  otherwise. I really need to create a pdf which contains a lot of images.
  Do you have any other solutions for my problem?

 Try JPEG. It shouldn't require as much ressources as PNG.
 Bump up physical memory of the machine, 1G or 1.5G, and
 allocate as much as possible for the JVM. Disable swapping.

 Using JPEG and wrap it in an SVG might help too.

 J.Pietschmann


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



Réf. : OutOfMemoryException

2004-08-10 Thread s-oualid

Just run your app with these parameters : 

  -Xmssizeset initial Java heap size
  -Xmxsizeset maximum Java heap size

Type java -X for detailled help on non-standard options.





--
Simon OUALID
--
ARTE FRANCE
Analyste Programmeur
[EMAIL PROTECTED]
Tél : 01.55.00.73.18
Fax : 01.55.00.73.89
--







Johannes Franz [EMAIL PROTECTED]
09/08/2004 14:44
Veuillez répondre à fop-user


Pour :[EMAIL PROTECTED]
cc :
Objet :OutOfMemoryException


Hello,

i am buildung a pdf which includes png. The used java library is jimi-1.0.jar. If i include to much png-images i get the OutOfMemoryException. The answer of the FAQ is to increase the memory which is allocated for java. Could you explain me how i can do this? Do you have any other solutions for the OutOfMemoryException? Do you thinks using JAI instead of JIMI could help?

Greetings,
Johannes.




Re: OutOfMemoryException

2004-08-10 Thread J.Pietschmann
Johannes Franz wrote:
i am buildung a pdf which includes png. The used java library is 
jimi-1.0.jar. If i include to much png-images i get the 
OutOfMemoryException. The answer of the FAQ is to increase the memory 
which is allocated for java. Could you explain me how i can do this?
Check your friendly Java documentation. The online version is
actually linked from the hint in the FOP documentation:
 http://xml.apache.org/fop/running.html#memory
 http://java.sun.com/j2se/1.3/docs/tooldocs/solaris/java.html
Do 
you have any other solutions for the OutOfMemoryException? Do you thinks 
using JAI instead of JIMI could help?
It depends. It is likely the problem is caused by the image cache.
Reducing the PNG resolution or switching to a format which compresses
better (low quality JPEG) might help.
J.Pietschmann
-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]


Re: OutOfMemoryException

2004-08-10 Thread Johannes Franz
I forgot to mention that I am using a batch process which only uses the
function one after another and not parallel. Perhaps the solution to my
problem is to reduce the maximum Number of parallel Threads to 1. It seems
that the programmers of fop set this number on 5. Perhaps somebody knows the
position in the jar where i can reduce this number. (I am using Jai for the
png)

Greetings,
Johannes.
- Original Message -
From: J.Pietschmann [EMAIL PROTECTED]
To: [EMAIL PROTECTED]
Sent: Tuesday, August 10, 2004 10:00 PM
Subject: Re: OutOfMemoryException


 Johannes Franz wrote:
  i am buildung a pdf which includes png. The used java library is
  jimi-1.0.jar. If i include to much png-images i get the
  OutOfMemoryException. The answer of the FAQ is to increase the memory
  which is allocated for java. Could you explain me how i can do this?

 Check your friendly Java documentation. The online version is
 actually linked from the hint in the FOP documentation:
   http://xml.apache.org/fop/running.html#memory
   http://java.sun.com/j2se/1.3/docs/tooldocs/solaris/java.html

  Do
  you have any other solutions for the OutOfMemoryException? Do you thinks
  using JAI instead of JIMI could help?

 It depends. It is likely the problem is caused by the image cache.
 Reducing the PNG resolution or switching to a format which compresses
 better (low quality JPEG) might help.

 J.Pietschmann

 -
 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: OutOfMemoryException

2004-08-10 Thread Johannes Franz
The pngs are the lowest sized images i can get. If i increase the memory,
which is allocated for java to the size that is necessary for the amount of
images, my system really slows down and nearly hangs up. Is there perhaps an
option to force fop to delete the imagecache? Because without such an option
it is not possible to create pdfs with a really big size of images.


- Original Message -
From: J.Pietschmann [EMAIL PROTECTED]
To: [EMAIL PROTECTED]
Sent: Tuesday, August 10, 2004 10:00 PM
Subject: Re: OutOfMemoryException


 Johannes Franz wrote:
  i am buildung a pdf which includes png. The used java library is
  jimi-1.0.jar. If i include to much png-images i get the
  OutOfMemoryException. The answer of the FAQ is to increase the memory
  which is allocated for java. Could you explain me how i can do this?

 Check your friendly Java documentation. The online version is
 actually linked from the hint in the FOP documentation:
   http://xml.apache.org/fop/running.html#memory
   http://java.sun.com/j2se/1.3/docs/tooldocs/solaris/java.html

  Do
  you have any other solutions for the OutOfMemoryException? Do you thinks
  using JAI instead of JIMI could help?

 It depends. It is likely the problem is caused by the image cache.
 Reducing the PNG resolution or switching to a format which compresses
 better (low quality JPEG) might help.

 J.Pietschmann

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



OutOfMemoryException

2004-08-09 Thread Johannes Franz



Hello,

i am buildung a pdf which includes png. The used 
java library is jimi-1.0.jar. If i include to much png-images i get the 
OutOfMemoryException. The answer of the FAQ is to increase the memory which is 
allocated for java. Could you explain me how i can do this? Do you have any 
other solutions for the OutOfMemoryException? Do you thinks using JAI instead of 
JIMI could help?

Greetings,
Johannes.