Shapes overlaid on Cells with data are omitted in PDF output

Hello,

When the attached “InlineShapes.xlsx” workbook, is converted to PDF, the Shapes in Sheet1 are omitted in the PDF output.

As a workaround, we copied Sheet1 (to the same Workbook), added a new empty column and moved the Shapes to the new column. When Sheet2 is converted to PDF, the Shapes do appear in the PDF output. The difference seems to be that the Shapes on Sheet1 are overlaid on top of on cells that also have data. Whereas, in Sheet2, the cells where the Shapes are positioned are empty.

The following code can reproduce this issue.

 String fileName =  [path] + "InlineShapes.xlsx";

 Workbook wb = new Workbook(fileName);
 
 PdfSaveOptions saveOpts = new PdfSaveOptions();
 saveOpts.setCheckFontCompatibility(true);
 saveOpts.setCreateDirectory(false);

 wb.save(fileName.replace(".xlsx", "_Cells.pdf"), saveOpts);

Notes:

  • We were able to reproduce this issue under Aspose for Java version 17.12
  • When viewing the PDF output, please navigate to the 2nd page in the PDF to see the contents of Sheet2.
  • Attachment: InlineShapes.zip (10.7 KB)

@oraspose

Thanks for using Aspose APIs.

We were able to observe this issue and logged it in our database for investigation and for a fix. Once, the issue is resolved or we have some other news for you, we will let you know asap.

This issue has been logged as

  • CELLSJAVA-42497 - Sheet1 shapes are lost and Stars in Sheet2 are rounded

@oraspose,

This is to inform you that we have fixed your issue “CELLSJAVA-42497” now. We will soon provide the fix after performing QA and including other enhancements and fixes.

@oraspose

Thanks for using Aspose APIs.

Please download and try the following fix and let us know your feedback.

The issues you have found earlier (filed as CELLSJAVA-42497) have been fixed in this Aspose.Cells for Java 18.2 update.

Please also check the following document/blog for your reference:

We have run tests against Cells version 23.7.2 and noticed this issue seemed to regress - no images shown now in the generated PDF from sheet1.
See attached zip file, containing the same input Excel template, saved PDF directly from Excel (File -> Print to PDF ) ; PDF generated with Aspose 23.7.2; and PDF generated with an older version of Cells.

Please let us know if you need additional info.
Thank you.
InlineShapesSheet1.zip (339.9 KB)

@oraspose,

Thanks for providing the sample file and details. I was able to reproduce the issue as you mentioned. I found that no images are being shown for shapes in the generated PDF from Sheet1.

We need to evaluate your issue in detail. We have opened the following new ticket(s) in our internal issue tracking system and will deliver their fixes according to the terms mentioned in Free Support Policies.

Issue ID(s): CELLSJAVA-45557

You can obtain Paid Support Services if you need support on a priority basis, along with the direct access to our Paid Support management team.

@oraspose
Your issue(CELLSJAVA-45557) has been resolved and the fixed functionality will be released with version 23.9. If you need this feature urgently, you can also consult our hot fix.
Here is the resulting file I generated using the latest function:
CELLSJAVA-45557-java.pdf (31.6 KB)

Thank you for the quick turnaround!

@oraspose,

You are welcome.

The issues you have found earlier (filed as CELLSJAVA-45557) have been fixed in Aspose.Cells for Java 23.9.