Hello Aspose Team,
I am using Aspose.Slides for Python via .NET and noticed an inconsistency between Windows(local) and Unix(UAT) environments when working with tables.
Problem: The value of the following properties differ between environments:
- table.x + cell.offset_y
- cell.height
The values returned by these functions in Windows and Unix differ by 10-20 points which makes it inconsistent. Other functionality(table column deletion, adding image, etc.) is working fine and consistent.
My suspicion is this might be related to font metrics or rendering engine differences.
Version used: aspose.slides@ 25.5.0
Logs:
In Local:
Adding picture: 31x38 to cell 0,1 at 36.2,142.4 with cell size 60.2x108.0
Adding picture: 60.2x16.0 to cell 0,2 at 36.2,250.4 with cell size 60.2x107.5
Adding picture: 60.2x12.8 to cell 0,3 at 36.2,357.9 with cell size 60.2x108.0
In UAT for the same 3 images:
Adding picture: 32x39 to cell 0,1 at 36.2,152.9 with cell size 60.2x124.8
Adding picture: 60.2x16.2 to cell 0,2 at 36.2,277.7 with cell size 60.2x108.0
Adding picture: 60.2x12.9 to cell 0,3 at 36.2,385.7 with cell size 60.2x124.8
Code used:
cell = table.rows[rowIndex][columnIndex]
cell_x = table.x + cell.offset_x
cell_y = table.y + cell.offset_y
cell_width = cell.width
cell_height = cell.height
img_ratio = img.width / img.height
img_width = cell_width
img_height = cell_width / img_ratio
logger.info(f"Adding picture: {round(img_width, 1)}x{round(img_height, 1)} to cell {columnIndex},{rowIndex} at {round(cell_x, 1)},{round(cell_y, 1)} with cell size {round(cell_width, 1)}x{round(cell_height, 1)}")