Hello
We currently are using OpenOffice to convert to PDF thousands of documents. We ran into many issue using this approach and we are evaluating your library as a good replacement.
So we tested your library using about 10000 different test documents. While it work correctly most of the time, some of our test documents cause the library to use all the memory (we cannot afford to allow more than 1GB of RAM per process for this JVM). It is mostly document having images. Even if the source document is a few megabyte (13MB) the consumption of memory of Aspose to be able to sucessfully convert it to PDF can eat up to 1.6GB for this perticular document.
From the stack trace, it seems to be related to manipulation of images. Here is an example for a crash for a power point document:
Exception in thread “main” java.lang.OutOfMemoryError: Java heap space
at com.aspose.slides.bqu.(Unknown Source)
at com.aspose.slides.bra.do(Unknown Source)
at com.aspose.slides.bqu.do(Unknown Source)
at com.aspose.slides.ImageTransformOperationCollection.do(Unknown Source)
at com.aspose.slides.Picture.do(Unknown Source)
at com.aspose.slides.Picture.do(Unknown Source)
at com.aspose.slides.sq.do(Unknown Source)
Here is an example of such stack trace for a Word document (for the other Aspose product Aspose.Words):
Exception in thread “Image Fetcher 0” Exception in thread “main” java.lang.OutOf
MemoryError: Java heap space
at java.awt.image.DataBufferInt.(Unknown Source)
at java.awt.image.Raster.createPackedRaster(Unknown Source)
at java.awt.image.DirectColorModel.createCompatibleWritableRaster(Unknown Source)
at sun.awt.image.ImageRepresentation.createBufferedImage(Unknown Source)
at sun.awt.image.ImageRepresentation.setPixels(Unknown Source)
at sun.awt.image.ImageDecoder.setPixels(Unknown Source)
at sun.awt.image.JPEGImageDecoder.sendPixels(Unknown Source)
at sun.awt.image.JPEGImageDecoder.readImage(Native Method)
at sun.awt.image.JPEGImageDecoder.produceImage(Unknown Source)
at sun.awt.image.InputStreamImageSource.doFetch(Unknown Source)
at sun.awt.image.ImageFetcher.fetchloop(Unknown Source)
at sun.awt.image.ImageFetcher.run(Unknown Source)
java.lang.OutOfMemoryError: Java heap space
at java.awt.image.DataBufferInt.(Unknown Source)
at java.awt.image.Raster.createPackedRaster(Unknown Source)
at java.awt.image.DirectColorModel.createCompatibleWritableRaster(Unknow
n Source)
at java.awt.image.BufferedImage.(Unknown Source)
at asposewobfuscated.zzQ5.zzZ(Unknown Source)
at asposewobfuscated.zzQ5.zzZ(Unknown Source)
at asposewobfuscated.zzQ5.zzZ(Unknown Source)
The same document converted loaded in OpenOffice will use a fraction of the memory the Aspose library require to convert it, wich is kind of a show stopper for us.
For the “Aspose.Cells” there are memory tweaks but we have not found such tweaks for Aspose.Slides. It is very important for us that the library is able to convert document using a much smaller memory footprint (using disk cache if required).
Alternatively would it be possible to only convert one Slide at a time and flush is to disk wichout eating up all the memory ?
I can send the related documents that requires high memory to convert and source code as well. I would prefer not sharing them on the forum though.
Regards