albrechtf / mcf2pdf

"My CEWE Photobook" MCF to PDF converter
Other
40 stars 37 forks source link

Exception in thread "main" java.lang.OutOfMemoryError: Java heap space #44

Closed therightdirk closed 6 years ago

therightdirk commented 6 years ago

Hi, after installing the libwebp.dll it worked up to the following error:

C:\Users\dirk\Desktop\mcf2pdf-0.3.4>mcf2pdf "Jahrbuch_2017.mcf" Buch.pdf [INFO ] net.sf.mcf2pdf.Mcf2FoConverter Rendering cover... Exception in thread "main" java.lang.OutOfMemoryError: Java heap space at java.awt.image.DataBufferByte.(Unknown Source) at java.awt.image.ComponentSampleModel.createDataBuffer(Unknown Source) at java.awt.image.Raster.createWritableRaster(Unknown Source) at javax.imageio.ImageTypeSpecifier.createBufferedImage(Unknown Source) at javax.imageio.ImageReader.getDestination(Unknown Source) at com.sun.imageio.plugins.jpeg.JPEGImageReader.readInternal(Unknown Source) at com.sun.imageio.plugins.jpeg.JPEGImageReader.read(Unknown Source) at javax.imageio.ImageIO.read(Unknown Source) at javax.imageio.ImageIO.read(Unknown Source) at net.sf.mcf2pdf.mcfelements.util.ImageUtil.internalRead(ImageUtil.java:273) at net.sf.mcf2pdf.mcfelements.util.ImageUtil.readImage(ImageUtil.java:84) at net.sf.mcf2pdf.pagebuild.PageImage.renderAsBitmap(PageImage.java:101) at net.sf.mcf2pdf.pagebuild.BitmapPageBuilder.addToDocumentBuilder(BitmapPageBuilder.java:77) at net.sf.mcf2pdf.Mcf2FoConverter.convert(Mcf2FoConverter.java:211) at net.sf.mcf2pdf.Main.main(Main.java:188)

Any idea? Thanks for your Support.

gizmo21 commented 6 years ago

Try increasing the Xmx:

https://github.com/albrechtf/mcf2pdf/blob/master/README.md#troubleshooting

therightdirk commented 6 years ago

Great - it worked. Some scripts are changed, although in the mcf it is all Verdana in the same size and some scripts are not exactly located a the same place on the page as in the mcf. Any idea? At the end of the converting it is said: "Warning: Could not get charToByteConverterClass!" What does that mean? Is there any Chance to produce single pages instead of double pages? Thanks again

gizmo21 commented 6 years ago

There are some issues regarding the cover layout on books with many pages which seems to be addressed in other pull branches, hopefully this will be merged into the main one.

And there are more options for the pdf output, just read the readme throughly and look for solved and open issues in this release. "For advanced settings, enter "mcf2pdf -h". This will give you information on how to adjust the output DPI setting and much more."

But remember this was seemingly made for archiving reasons not to have it printed professionally again.

albrechtf commented 6 years ago

@therightdirk Please also note that one issue should only be created for one problem you encounter (not as your personal support forum). As your initial issue has been resolved, I close this issue here.