9

Basically, what i want to know is, is there any better open-source option other than JODConverter, Apache POI, docx4j to do a conversion of Office documents - docx,doc,xls,xlsx,odt.. in to a PDF format. I have tried all these options, its working fine for smaller and simpler files. If the documents contains fields, objects, tables etc. those are not properly converted. None of these tools forums are active too. If possible we need to do use Java only. Any one have any better suggestions?

Alexis Pigeon
  • 7,423
  • 11
  • 39
  • 44
Kris
  • 8,680
  • 4
  • 39
  • 67
  • 1
    If JODConverter is not good enough for you (did you try it with the latest release of OpenOffice/LibreOffice?), then you probably should look into using Office itself. Yeah, I know its not open source. – JasonPlutext Sep 25 '12 at 21:48
  • did you find anything? I m also looking for something like this. – iRunner Aug 20 '13 at 12:44
  • I'm using JOD, thats a dead project, still, can serve the purpose – Kris Aug 23 '13 at 10:30
  • On the back of what @JasonPlutext said, Open or Libre office should be able to open the files you're looking at and export them to PDF. Automating this task, however, is something I haven't looked into. – Jamie Taylor Sep 23 '13 at 09:53

3 Answers3

1

We ship with both open-source and closed-source office document converters. Apache POI is the best open-source office document converter we've found. Apache POI is active too. We have had success in fixing bugs ourselves, getting attention from developers for well-documented test cases/failures, and on hiring committers to the project to fix/update things we needed quickly.

Martin Serrano
  • 3,727
  • 1
  • 35
  • 48
  • POI may be the best, for someone who develops this functionality to distribute. But for some one who needs the black-box output POI cannot be recommended. POI can be reliable if one can maintain the builds with customization. We want a solution which can do action directly. The maintenance is expected to be minimum – Kris Sep 25 '12 at 08:46
  • If it has to be open source, POI is the best I know of. – Martin Serrano Sep 25 '12 at 13:53
  • @Martin, Which formats are you using POI to convert? And does it convert to PDF out-of-the-box these days? – JasonPlutext Sep 26 '12 at 00:12
0

a commercial library to do this is http://www.aspose.com/java/total-component.aspx

it's reasonably good - i have used an old version (haven't checked out their latest updated version).

Chii
  • 14,540
  • 3
  • 37
  • 44
0

I've recently used XDocReport. They support converters from docx to pdf (explained here)

Hans Maes
  • 186
  • 1
  • 5
  • Just to clarify the XDocReport docx->pdf converter: it loads docx with POI in a XWPFDocument and loop for each structures of POI (XWPFParagraph, XWPFTable, etc) to create iText 3.1.7 structure to generate PDF. If you want just to convert docx to pdf, please read [XWPFDocument 2 PDF](https://code.google.com/p/xdocreport/wiki/XWPFConverterPDFViaIText) – Angelo Oct 29 '13 at 22:44