The problem is the following, when I place a text box in a rotation of 270 degrees, the error appears (error01.png), if I change it to 269 or 271 degrees it works perfectly
Attached original file as well
- Code: Select all
public byte[] convert(byte[] file, String filename) throws IOException {
Locale.setDefault(locale.getLocale());
license.loadLicense();
logger.info("Converting " + filename);
logger.debug("create Workbook " + filename);
Workbook workbook = new Workbook();
ByteArrayOutputStream documentConverted;
try {
logger.debug("Loading from Stream " + filename);
workbook.loadFromStream(new ByteArrayInputStream(file));
workbook.getConverterSetting().setSheetFitToPage(false);
logger.debug("save the Workbook to a PDF file. " + filename);
documentConverted = new ByteArrayOutputStream();
workbook.saveToStream(documentConverted, FileFormat.PDF);
}finally {
workbook.dispose();
}
logger.info("Converted " + filename);
return documentConverted.toByteArray();
}