We're sorry Aspose doesn't work properply without JavaScript enabled.

Free Support Forum - aspose.com

Cells to PDF with image is mirrored


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);

    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:



Thanks for the screenshot and sample code segment.

Please try our latest version/fix: Aspose.Cells for Java (Latest Version).

If you still find the issue with latest version, kindly do provide us your template file Excel file and output PDF file, we will check it soon.

This is the ZIP (67.0 KB) that contains both the original Excel and rendered PDF.

Version was changed 17.7 to 17.9.


Thanks for the sample files.

Well, your template Excel file does not contain logo image in the header/footer of the worksheet. I think you might be adding the logo image to header/footer either manually via MS Excel or via Aspose.Cells APIs. It is best you should provide your final source Excel file which we could convert to PDF via Aspose.Cells APIs to reproduce the issue on our end. Alternatively (if you are adding the logo image via Aspose.Cells APIs), we appreciate if you could create a sample console application (runnable) with v17.9, zip the project and provide us here, we will check it soon.

Everything is done in Java. There is no embedded image.

The image is watermarked use Nuxeo PDFTransformationService API.

In this ZIP (371.9 KB), there a doc (with similar implementation to convert to pdf using AsposeWords) that goes through the same procedure and Logo is rendered fine.

The text on the upper right hand corner as well as the disclaimer on the bottom is also watermark, so text content seems to be fine.

Only the image is mirrored on the Excel content. The cover page is not an Excel (it is a pdf that is appended to the pdf rendition of the Excel) and the image is not mirrored. Image is watermarked over the entire document. That is, the image in the first page is done in the same step in the image on the second page.


Thanks for the providing sample Word document and output PDF files.

Well, it is hard to reproduce the issue based on your given resource files. We need to reproduce the issue on our end, so we could log a ticket for it into our database and our product team could investigate it precisely and figure out your issue soon. We appreciate if you could separate the issue regarding Aspose.Cells APIs and create a simple console demo application (runnable), zip the project with all the files and provide us to reproduce the issue on our end. If this is not possible, kindly do add some lines to your code to save to Excel file (which should contain the data with logo image), you may also create final Excel file manually in MS Excel. We will do the conversion, i.e., Excel to PDF via Aspose.Cells to try to reproduce the issue on our end.