Hi,
This one is quite a weird and complex one and difficult to replicate but causes massive problems.
Aspose being server-side compatible we run it inside a service; in Windows this gives the process session 0. Here is a quick article explaining sessions in Windows:
However, on a certain hardware Aspose.Slides gives us different (wrong) values for StandardHeight and StandardWdith when run in session 0 as opposed to session 1. This causes the output file to also have its height and width reset to the wrong one!
To test, you can use any Excel Workbook, although I have attached one for convenience.
Running the following code:
var book = new Workbook(“Test.xlsx”);
Console.WriteLine(book.Worksheets[0].Cells.StandardHeight);
Console.WriteLine(book.Worksheets[0].Cells.StandardWidth);
In session 1:
Height: 12.75
Width: 8.42857142857143
This seems to be the correct value.
When running in session 0 I get:
Height: 13.2
Width: 8.3333333333333
To run the program in session 0 you can use the following command as administrator to open up a session 0 session
psexec.exe –s –i 0 cmd.exe
Now the caveat here is that not all hardware we run it on produces the incorrect result. So it would be nice if you could check with engineers what the probable cause of this could be.
Best regards,