0

I am converting docx files to pdf using Poi XWPF, the result is good, but the DrawText are missing, how can i fix this?

XWPFDocument document = new XWPFDocument(inputStream);
PdfOptions options = PdfOptions.create().fontEncoding("windows-1250");
OutputStream out = new FileOutputStream(new File(outputTemplate));
org.apache.poi.xwpf.converter.pdf.PdfConverter.getInstance().convert(document, out, options);

The text disappear in the pdf

oueslatibilel
  • 567
  • 1
  • 8
  • 24
  • org.apache.poi.xwpf.converter.pdf.PdfConverter is not an Apache POI class, but rather, from xdocreport? https://code.google.com/p/xdocreport/source/browse/thirdparties-extension/org.apache.poi.xwpf.converter.pdf/src/main/java/org/apache/poi/xwpf/converter/pdf/PdfConverter.java – JasonPlutext Aug 05 '13 at 10:24
  • yes, it is, I tried docx4j and it have the same issue, the problem i need one free api – oueslatibilel Aug 06 '13 at 05:09
  • 1
    If the issue is just text boxes, a workaround for docx4j right now is to use tables instead. Or, you can try LibreOffice/OpenOffice – JasonPlutext Aug 06 '13 at 05:28
  • 1
    That is what i am trying to do right now, and it work fine with table, the only issue is i have to make sure that the final user don't use it. – oueslatibilel Aug 06 '13 at 07:49

0 Answers0