Space looks like it dissapeared and the following text is too close to the square character. See attached files.
I am using spire.doc for Java, maven dependency of version 5.4.10.
The code below runs thru spring on SAP NetWeaver Application Server 7.21 / AS Java 7.30.3710.251566.20121218150943.
Thanks for help in advance.
- Code: Select all
public byte[] docxToPdf(byte[] docx) {
LOGGER.debug("Converter start.");
Document document = new Document(new ByteArrayInputStream(docx));
ToPdfParameterList params = new ToPdfParameterList();
initFonts();
params.setPrivateFontPaths(fonts);
document.setEmbedFontsInFile(true);
byte[] fileBytes = null;
ByteArrayOutputStream fileStream = null;
try {
fileStream = new ByteArrayOutputStream();
document.saveToStream(fileStream, params);
fileBytes = fileStream.toByteArray();
LOGGER.debug("Converter done. Size: {}", fileBytes.length);
} catch (Exception e) {
LOGGER.debug("Converter failed. ", e);
} finally {
if (fileStream != null) {
try {
fileStream.close();
} catch (IOException e) {
LOGGER.error("", e);
}
}
}
return fileBytes;
}