We have a problem when saving a XLSX (OriginalDocument.xlsx) file as PDF.
The document contains 2 flowcharts and after saving as PDF, on the output document (outputDocument.pdf) page 2 some of the arrow aren’t in the right place.
Test with Aspose.Cells 21.10
I provide as an attachment the source code as well as the file element.zip (278.7 KB)
I tested your scenario/case using our latest version/fix by converting your template file to PDF. I then manually converted/saved to PDF via MS Excel. I noticed no significant issue. The only minor thing I found is some diagonal shapes (e.g. “AutoShape 102” and “AutoShape 99” at the bottom of the second page) are shifted to leftwards a bit further (than what MS Excel does render to PDF), the arrows shapes are rendered ok. Other than this, I do not see any issue, even other elements are rendered a bit better than of MS Excel. Could you please share a screenshot to highlight the issue comparing output PDF by Aspose.Cells Vs output PDF by MS Excel. We will check your issue soon.
Effectively, we opened this ticket because of the arrows that are shifted in the diagram.
I send you a smaller document allowing you to visualize the shift more quickly.
Please notice, I am able to reproduce the issue as you mentioned by converting your template XLSX file to PDF file format. I found some shapes are misaligned in the output PDF. I have logged a ticket with an id “CELLSNET-52324” for your issue. We will look into it soon.
Once we have an update on it, we will let you know.
We evaluated your issue further. We checked the PDF generated by MS Excel and found that there are spaces at the arrow connections, see the screenshot attached. It’s just that there may be some errors in our calculations, resulting in large spaces. So we think it might not be a bug with the APIs.
solution:
If the file is manually generated, please manually insert a new rhombus to replace the original one
If the file is automatically generated, please use ‘twoCellAnchor’ to generate a diamond to replace ‘oneCellAnchor’.