ObeoNetwork / M2Doc

The M2Doc technology enables the generation of Office Open XML documents from models.
http://obeonetwork.github.io/M2Doc/
Eclipse Public License 2.0
40 stars 22 forks source link

Have a look at PdfConverter #357

Open ylussaud opened 5 years ago

ylussaud commented 5 years ago

If it works fine, it would be nice to generate a docx or a pdf according to the file extension of the output document.

ylussaud commented 5 years ago

It is not part of the POI project and need new dependencies:

fr.opensagres.xdocreport fr.opensagres.poi.xwpf.converter.core 2.0.2
ylussaud commented 5 years ago

The converter uses iText which is LGPL that can be an other problem.

ejuliot commented 3 years ago

POI already has a built-in support for DOCX to PDF conversion. Loot at https://stackoverflow.com/questions/43363624/converting-docx-into-pdf-in-java (org.apache.poi.xwpf.converter.pdf.PdfConverter)

ylussaud commented 3 years ago

As stated above PdfConverter is not part of apache POI but fr.opensagres.poi.xwpf.converter.core that support apache POI 4.0.1. M2Doc is using apache POI 4.1.0 and will move to next versions.

ylussaud commented 2 months ago

The LGPL licence is not an issue, there is LGPL code in the Orbit update site. At the moment both M2Doc and fr.opensagres.poi.xwpf.converter.pdf 2.0.0 depend on POI 5.2.3 so I was able to tests the pdf conversion.

There are the following issues:

Overall the output pdf is pretty close to the word document if it don't use MTable.