Hello,
Below is a method used to convert a docstream (Excel worksheet, .xls extension) to a PDF:
private ByteArrayOutputStream convertToStream(InputStream docStream) throws Exception {
Workbook book = new Workbook(docStream);
PdfSaveOptions saveOptions = new PdfSaveOptions(SaveFormat.PDF);
saveOptions.setAllColumnsInOnePagePerSheet(true);
ByteArrayOutputStream outStream = new ByteArrayOutputStream();
book.save(outStream, saveOptions);
return outStream;
}
Then applying an logo image (67.6 KB) mirrors the image. This bug should have been fix in CELLSJAVA-40282 but is still present.
The Aspose-Cells dependency:
<dependency>
<groupId>com.aspose</groupId>
<artifactId>aspose-cells</artifactId>
<version>17.7</version>
</dependency>