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

Free Support Forum - aspose.com

Calculation of cell position for Table using Aspose.Slides

I have a pptx presentation that servers as a template. Main part of this is a table.
With aspose I fill the data into the table.
The data is added row by row and at the end of each row I put an image into the presentation, so that it looks as if the image was part of a cell. I do this at the end of each row, because the content may change the heigth of each row.
I calculate the position of the image by using table.getX() table.getY() and cell.getOffsetX() cell.getOffsetY() plus some minor calculations for the exact position insinde the cell.
But in the result the images end up beeing to low. From my debugging I found out that the result of cell.getOffsetY() is bigger than it should be. Somehow it seems, that the content takes more place than it does in the end.
However that only happens on my customers environment, when I test it locally everything works as expectet. This way I also compared all the values I used to locate the cell.
Everything is identical between those two environments, as far as I know.
Does anyone have an idea what could cause this problem.


I have observed the information shared by you and have not been able to understand the requirement shared by you. I request you to please provide a working sample project along with source, generated and desired output presentation. Secondly, from your comments that on one machine you are unable to observe the issue and observe the issue in customer environment. This means that issue is most likely not related to Aspose.Slides. I request you to please view verify the screen resolution and display percentage settings on machine where issue is reproduced.

Hi @mudassir.fayyaz,
thanks for your quick response.
The presentation I’m creating is embedded in a big project, so I don’t see an easy way to provide a working example.
A quick summary is, that I need to calculate the exact position of a cell in a table during creation.
Could this be related to a custom font, which may not be installed on the server where the problem occurs? Which font would aspose use, if the font in the template document is not available on the system?


I have read your initial requirements. It seems that you are probably trying to overlay an image on some cell and for that you are in need getting position. I suggest you to please visit this documentation link for your kind reference, in which we have shared example of adding image inside cell and that may be applicable on your end.

Hi @mudassir.fayyaz,

I solved the problem by embedding the custom font to the presentation.
If you did not know yet, maybe it helps for the future, to know that you get false results for cell positions if the used font is not present on your system.

Thanks for your help again.


Its good to know that you have resolved your problem on your own.