Specific xlsx file rendered with bad quality

The attached xlsx file is rendered with very bad quality. See “aspose.cells.8.4.2.png”

Hi Vassil,


Thank you for contacting Aspose support.

I have evaluated your presented scenario while using the latest version of Aspose.Cells for .NET 8.4.2.2, and I am able to observe the mentioned issue. However, if you set the resolution of the resultant image in your code, you will be able to get better quality. Please check the following piece of code and attached resultant images for your reference.

C#

var book = new Workbook(“D:/110678_BadQuality.xlsx”);
var printOptions = new ImageOrPrintOptions();
printOptions.OnlyArea = true;
printOptions.ImageFormat = ImageFormat.Png;
printOptions.HorizontalResolution = 600;
printOptions.VerticalResolution = 600;
var render = new SheetRender(book.Worksheets[0], printOptions);
render.ToImage(0, “D:/withsettingresolution.png”);

Hi Babar,


Thanks for the fast answer! In my opinion this is not a solution.
The image at 600 dpi will be too big - 4964 x 7016 pixels, which will consume too much memory and CPU power. And even then the quality is not good enough.

Best Regards,
Vassil

Hi Vassil,


Thank you for writing back.

Yes, setting a high resolution will generate a larger image and may consume more resources. Other option is setting the ImageOrPrintOptions.SmoothingMode but the result may still not be up to your expectation. Please check the attached image for your reference.

Could you please provide little more details about your desired image format and the area on worksheet that you wish to render? This will help us better understand your goals, and we will be able to assist you precisely further in this regard.

Hi Bazar,


I am rendering at 180dpi and I am using SmoothingMode = AntiAlias.
I also need to render the whole page.
My only concern is the letters quality. They are really looking bad.

Best Regards,
Vassil

Very sorry for misspelling your name:(

Hi Vassil,

DWProject:
Very sorry for misspelling your name:(

No problem.

Regarding your original concerns, please spare me some time to work with your requirement, and get back to you with a solution. If required, I will also seek help from the product team in this regard.

Hi again,


This is to inform you that I have logged this matter for the product team’s review under the ticket CELLSNET-43672. Please let us analyze this scenario further. As soon as we have more update, we will post here for your kind reference.

Hi Vassil,


We have analyzed the ticket CELLSNET-43672 and have found that the scenario was to be fixed in the API itself. The problem has been fixed, and we will shortly provide the fix with the upcoming revision of the API after incorporating other enhancements.

Great news!

Thanks a lot!

Hi Vassil,


Thank you for your patience with us.

Please give a try to the latest version of Aspose.Cells for .NET 8.4.2.5 for the issue logged earlier as CELLSNET-43672. I have attached the resultant image generated with following piece of code here for your reference.

C#

var book = new Workbook(“D:/110678_BadQuality.xlsx”);
var printOptions = new ImageOrPrintOptions();
printOptions.OnlyArea = true;
printOptions.ImageFormat = ImageFormat.Png;
printOptions.SmoothingMode = System.Drawing.Drawing2D.SmoothingMode.AntiAlias;
printOptions.HorizontalResolution = 180;
printOptions.VerticalResolution = 180;
SheetRender render = new SheetRender(book.Worksheets[0], printOptions);
render.ToImage(0, “D:/output.png”);

Hi Babar,


Thanks for the new version! The issue is fixed in it.
I’ve noticed a big change in the text size, positioning and spacing. For most of my test files the change is for good.
But, attached are several sample files plus rendered images where you can see regression in the quality between version 8.4.2.5 and 8.4.2. The regression is that some texts are no longer visible when rendered with 8.4.2.5.

I just want to be sure that you are aware of them.

Best Regards,
Vassil

Hi Vassil,


You are right. Font size was increased a little while rendering the spreadsheets for better visibility. I have checked your shared images too, and I believe you can get this behavior corrected by calling the Worksheet.AutoFilRows. Anyway, I will perform a few test with your provided spreadsheets and post my observations here for your reference.

Hi again,


Thank you for your patience.

This is to inform you that I have performed tests regarding the worksheet rendering against your recently shared spreadsheet, and I am able to notice the following issues. Also attached are the comparison of Excel view and Aspose.Cells generated images for the points 3) & 4).

  1. CELLSNET-43691: Text is getting truncated at the bottom while rendering the Control-Chart-Mass-dwright-V01.xlsx to image. Please note, I have tried AutoFitRows method without any improvement.
  2. CELLSNET-43690: Text is getting truncated at the bottom while rendering the Attachment_requirements_CDT_code-1.xlsx to image.
  3. CELLSNET-43693: Misplaced text while rendering MPFS 2013F vs 2014P.xlsx to image.
  4. CELLSNET-43694: Text Alignment lost when GeneralPolicySummation.xlsx is rendered to image.

The aforesaid tickets have been logged in our bug tracking system for the product team’s review. Please allow us some time to properly evaluate the presented scenarios, and get back to you with updates in this regard.

Hi Vassil,


This is to inform you that we have resolved the recently logged ticket (CELLSNET-43690, CELLSNET-43691, CELLSNET-43693, CELLSNET-43694). We will shortly provide the fix here after performing quality assurance, and incorporating other enhancements.

That’s nice! So, I’ll wait for the next release.


Thanks a lot!
Vassil.

Hi,

Thanks for using Aspose.Cells.

We have fixed the following issues

  • CELLSNET-43690 - Text is getting truncated at the bottom while rendering worksheet to image
  • CELLSNET-43691 - Text is getting truncated at the bottom while rendering worksheet to image
  • CELLSNET-43693 - Misplaced text while rendering spreadsheet to image
  • CELLSNET-43694 - Text Alignment lost when spreadsheet is rendered to image

Please download and try the latest fix: Aspose.Cells
for .NET v8.4.2.7
and let us know your feedback.

Hi,


Looks great! I’ve found no problems with it. There is even an improvement in rendering speed!
Keep up the good job!

Thanks!
Vassil

Hi Vassil,

Thanks for your feedback and using Aspose.Cells.

It is good to know that you saw the improvement and fix in the latest version. Let us know if you encounter any other issue, we will be glad to look into it and help you further.

The issues you have found earlier (filed as CELLSNET-43694;CELLSNET-43693;CELLSNET-43691;CELLSNET-43690;CELLSNET-43672) have been fixed in this update.


This message was posted using Notification2Forum from Downloads module by Aspose Notifier.