Using Apache POI to convert DOCX to PDF

Viewed 1294

When using Apache POI when converting DOCX to PDF with this code:

XWPFDocument document = new XWPFDocument(is);
PdfOptions options = PdfOptions.create().fontEncoding("windows-1250");
PdfConverter.getInstance().convert(document, baos, options);

The code is able to generate PDF output but with missing line spaces, for example in DOCX there are two line spaces between paragraphs on the output PDF only one, etc.

What could be causing this weird behaviour?

0 Answers
Related