I have docx file(report.docx in attachments) and I try to generate pdf - it looks nice with content but it differs from OpenOffice output(also in attachments). I wonder what settings should I use to make them similar? I use 3.2.0 version. My code for generation:
- Code: Select all
String regex = ".*(arial|times).*";
PhysicalFonts.setRegex(regex);
Mapper fontMapper = new IdentityPlusMapper();
template.setFontMapper(fontMapper);
ByteArrayOutputStream bos = new ByteArrayOutputStream();
Docx4J.toPDF(template, bos);
return bos;
Thanks in advance.