I am trying to render about 100,000 - 80 column records through FOP and it tanks pretty much everytime (OutOfMemoryException). I know iText could handle that kind of load but I can't use it because of the LGPL license. Are there any alternative Java libraries to iText that can handle rendering a high volume of data to PDF?
-
Why not iText? http://stackoverflow.com/questions/602977/interactive-pdf-creation-alternatives-to-acrobat – KV Prajapati Sep 04 '09 at 03:51
-
Um, he mentioned iText but has an constraint because of the license. – cletus Sep 04 '09 at 03:53
-
8LGPL is not GPL, as long as you don't modify iText itself it doesn't affect commercial projects. You may know this already (or it may not be up to you), but just making sure. – Yishai Sep 04 '09 at 05:35
-
1iText is dual licensed; it is distributed under both MPL and LGPL. It is upto to you to choose which license you want to adhere. – Vineet Reynolds Sep 04 '09 at 10:27
-
You can find the license agreement @http://www.lowagie.com/iText/download.html – Vineet Reynolds Sep 04 '09 at 10:28
-
Unfortunately my company does not allow use of products using the LGPL or MPL licenses. So I must look for alternatives paid or otherwise. Thanks again for your suggestions. – Mike C. Sep 04 '09 at 13:33
-
47IText has now got a very aggressive AGPL license – Bryan Hunt Feb 07 '12 at 17:43
-
8As @Bryan Hunt wrote, IText has now a AGPL license and not LGPL which means that it is not appropriate for closed source projects. You have to make the code which use IText available for any user of your web application. – kroiz Jul 04 '12 at 16:01
-
8Yeah, basically if you use iText, you need to write a server into which you send (for example) XML documents. Don't put any of your company internals or IP into it, and release it as open source. A lot of work when you just want to bang out a little PDF of a sales report. Using an old version of the library is an option but it seems that matey has decided to milk it for every penny it's worth. – Bryan Hunt Jul 04 '12 at 23:27
8 Answers
-
1
-
1
-
3
-
4
-
4[Apache PdfBox](https://pdfbox.apache.org/), as of this writing, is pretty stellar and completely free-to-use. – Don Cheadle Jan 28 '15 at 02:15
-
PdfBox is active and looking great. I have some form filling in PDF that works like a charm. – Davor Hrg Aug 12 '17 at 10:14
Have a look at RenderX for an alternative to FOP.
It costs money, but if you have an existing solution in place that might be the cheapest.

- 73,784
- 33
- 194
- 347
Have you tried to increase the amount of heap available to the JVM? OUtOfMemory while processing huge amounts of data usually calls for more memory.

- 1,046
- 6
- 7
-
Yeah, the problem is FOP requires you dump all the XML doc in memory it simply can't handle the load. I increased the heap space up to 1GB and still a no go. – Mike C. Sep 04 '09 at 13:30
try pdfjet is bsd licensed and there is also a commercial version with more features http://pdfjet.com/os/edition.html

- 4,890
- 2
- 34
- 50
Aspose offers a PDF component for Java. Aspose is also used to create Word, Excel, PowerPoint... documents in Java (or .Net).
However, it is not a free software...

- 79,475
- 49
- 202
- 273
-
1The Aspose Java PDF library is hot garbage. It doesn't even support HTML formatting. – iandisme Jan 03 '13 at 17:23
-
Never had a good experience with any Aspose products - plus, they cost money. – vikingsteve Oct 25 '16 at 10:50
This might be a little late for you Mike C. but in case others have simliar large document low footprint requirements and redistribution requirements then it's worth sharing. Docmosis Community edition can be freely redistributed and can produce very large documents with a constant memory footprint (stream based processing). You (or your customers - since you're implying redistribution) would have to be willing to install OpenOffice somewhere though to allow the conversion.

- 6,513
- 2
- 24
- 19