SheetRender.ToImage incorrect clipping

Hello,

I have upgraded Cells from version 8.6.3 to 19.5. Now pages are not printed correctly anymore.

I pinpointed the problem and it is related to the print resolution, if I print with 600dpi, the printed page is too small. In my opinion, the clipping is incorrect.

It worked well before, could you please fix this issue and make it run again.

Best Regards,
Raphael

@Raphael_Affolter,

Thanks for the details.

Please provide us your sample code (runnable) and template file (if any) to reproduce the issue, we will check it soon.

I will attach a sample. The first part is only to simulate printing. The interesting part is the generation of an EMF in the function PrintDocument1_PrintPage.

Best Regards,
Raphael

AsposeCellsToEmfIssue.zip (131.7 KB)

@Raphael_Affolter,

Thanks for the sample project with template file.

I could not evaluate your issue precisely due to my default installed printer “Adobe PDF” is expired. Either you may provide a simplified sample code (which should only use Aspose.Cells APIs) or give details on how to test the case.

Hello

The issue could be reproduced with any printer on your system, please use any printer (which is not expired) either by changing the default printer of the operating system or in code:

printDocument1.PrinterSettings.PrinterName = “one of your printers”;

The printer output itself is irrelevant, it is just used to change the DPI from 96 (Screen) to e.g. 600 of the printer. Interesting is the EMF output which is then clipped. I upload a sample of the EMF which shows that only a small region is visible.

CellsReprocase.zip (117.2 KB)

Best Regards,
Raphael

@Raphael_Affolter,
We were able to observe the issue but we need to look into it more. We have logged the issue in our database for investigation and for a fix. Once, we will have some news for you, we will update you in this topic.

This issue has been logged as

CELLSNET-46749 - SheetRender.ToImage creates incorrect EMF image

@Raphael_Affolter,

Please try our latest version/fix: Aspose.Cells for .NET v19.5.3 (attached)

Your issue should be fixed in it.

Let us know your feedback.
Aspose.Cells19.5.3 For .Net2_AuthenticodeSigned.Zip (4.9 MB)
Aspose.Cells19.5.3 For .Net4.0.Zip (4.9 MB)

Thanks for the fix, it works well now.

Best Regards,
Raphael

@Raphael_Affolter,

Good to know that your issue is sorted out by the new fix/version. Feel free to contact us any time if you need further help or have some other issue or queries, we will be happy to assist you soon.

The issues you have found earlier (filed as CELLSNET-46749) have been fixed in Aspose.Cells for .NET v19.6. This message was posted using BugNotificationTool from Downloads module by Amjad_Sahi