I need to convert a docx
in `pdf. This is the starter docx:
The document docx has something like a table border and other table ( in the docx at the end , belove the two fields, there are a lot of rows with black border). Another problem is that this pdfConvert doesn't print the input that I have put in the document
So My code is this:
XWPFDocument doc = new XWPFDocument(new FileInputStream(originalPathSource));
PdfOptions options = PdfOptions.create();
OutputStream out = null;
try {
out = new FileOutputStream(new File(targetFileName));
PdfConverter.getInstance().convert(docx, out, options);
out.flush();
out.close();
}..
My libraries are:
<properties>
<versioniApache>4.0.1</versioniApache>
<versioniApachePDF>1.0.6</versioniApachePDF>
<versioniApacheSchema>4.1.2</versioniApacheSchema>
</properties>
<dependencies>
<dependency>
<groupId>org.apache.poi</groupId>
<artifactId>poi</artifactId>
<version>${versioniApache}</version>
</dependency>
<dependency>
<groupId>org.apache.poi</groupId>
<artifactId>poi-ooxml</artifactId>
<version>${versioniApache}</version>
</dependency>
<dependency>
<groupId>fr.opensagres.xdocreport</groupId>
<artifactId>fr.opensagres.poi.xwpf.converter.pdf</artifactId>
<version>2.0.2</version>
</dependency>
The pdf's result has only the words in the docx and it lsoes the table border outside and inside. Anyone can help me?