|
Taking the "plugin-resources" files from 2.5.1 and putting them into the plugin for 2.2.1 results in a working plugin that seems to have all of the fixes that have gone in since 2.2.1 (contents page not coping with > 10 sections, not including images in same directory, etc) yet doesn't give OOME. Of the other diffs in these plugin versions that I can see Any ideas? At least now I can build a custom version of this plugin and have something working, but would be nice to have this done officially and someone in the know can understand why the official latest release gives OutOfMemoryError on significant size PDF generation. Hi Andy, I can reproduce your problem. However, I get the same OOME when running fop from the command line on the generated fo file, which means that the plugin is not at fault. What I actually don't understand is why it works with plugin 2.2.1. I verified that in your case it's the table of contents that is responsible for the OOME. This is a well-known issue with forward references [1], I removed the toc creation from the xsl transformation and your pdf was created fine. So the question is if you want/need the toc, we can easily add an option to skip the toc generation (and rely on pdf bookmarks) or maybe move the toc to the end of the file, which would avoid the forward references (still need to check if this actually works). [1] http://xmlgraphics.apache.org/fop/0.94/running.html#memory Hi Lukas, I have no particular requirement for the TOC. The PDF bookmarks are more important anyway IMHO. But if you could add an option for TOC with options like "start", "end", "none" then you're catering for all tastes. In terms of when you run fop from the command line, aren't you also using Xerces/Xalan/Batik in that process? No idea what has changed in Xerces/Xalan between 2.4 and 2.7/8 so can't help on why that should matter. I deployed a snapshot, please test. The property is called maven.pdf.generateTOC and can take values 'start' (default), 'end' or 'none'. maven plugin:download -Dmaven.repo.remote=http://people.apache.org/repo/m1-snapshot-repository/,http://repo1.maven.org/maven Thx. Tried the 2.5.2-SNAPSHOT with "end" and "none" and there's no OutOfMemoryError now!. The logo locations need to be relative paths (with leading slash due to maven.pdf.companyLogo=/images/logos/DataNucleus_AccessPlatform_80.jpg Thx. Problem resolved with TOC at end Ok, I'll close this then. I still don't know exactly why this worked with plugin 2.2.1 but most likely because internal links didn't work then ( |
||||||||||||||||||||||||||||||||||||||
OOME also occurs using Maven 1.0 and 2.5.1 plugin, concluding that the issue is likely the plugin (and its dependencies) and not the version of Maven. I'm using JDK1.5_12 on Linux btw