Aspose renders the same worksheet to images in different size in Session 1 vs Session 0

Hi,


Please try our latest version/fix: Aspose.Cells for .NET v8.8.3.4 (.NET 2.0 and .NET 4.0) (attached).

We have fixed your issue “CELLSNET-44564” now.

Let us know your feedback.

Thank you.

Hi,



Thanks for your updates. I’ve tested it again using Aspose.Cells 8.8.3.4 and the following code:



var book = new Workbook(@“test.xlsx”);

Worksheet sheet = book.Worksheets[0];

var options = new ImageOrPrintOptions

{

ImageFormat = ImageFormat.Emf,

OnlyArea = false,

OnePagePerSheet = true

};

sheet.Charts[0].ToImage(@“out.Emf”, options);



, but it doesn’t fix the issue, while it created another wired result in session 0 when setting DPI to 96.



I’ve attached the output files, you can see part of the vertical axis ticklabels are missing.



It only happens when setting DPI to 96 in session 0. Could you please check it again to see the possible cause of the issue?



Thanks

Hi John,


Thank you for writing back.

I have shared your feedback with the concerned member of the product team. Please allow us some time to further evaluate the case and get back with updates in this regard.

Hi,

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

We have fixed your issue “CELLSNET-44564” now.
Please try
the fix when setting DPI to 96.

We are afraid, the labels’ overlapping issue is not fixed for now. After analysis, we found the position of plot area and legend is customized in the source Excel file (text.xlsx) and these are in a critical state. For this case, we cannot do well as Excel at the moment. You may use the following 3 solutions to avoid the overlapping issues for your requirements.

  1. Set background color of legend to none
    sheet.Charts[0].Legend.Area.Formatting = FormattingType.None;

  2. Reduce the height of plot area

c.Calculate();
c.PlotArea.Height -= 50;
  1. Don’t use the position of plot area in the excel file. Set it to automatic values.

c.PlotArea.SetPositionAuto();

Thank you.

Hi,



Thanks for your updates.



It looks like both size and layout of the output .emf image are correct (except for the label’s overlapping which you’ve already mentioned), which is great.



However, I noticed when I copy the output image into Word, and resave it into .PDF file, the labels have been changed into a wired state.



I tried both set and without set DPI, all the chart image has the same issue.



I’ve attached the screenshot and the output image for your reference. (You can see label “100” became “10”…) Could you please have a look into that?



Thanks

Hi John,


Thank you for your feedback.

Regarding your recently shared scenario, I am able to replicate the issue on my side. Please note, I have generated the EMF in Session 1 while using Aspose.Cells for .NET 8.8.3.7 then I have manually inserted the EMF in a Word document (using Word 2013) and converted it to PDF format. I can see that the vertical axis labels greater than 99 have been converted to 10 in the PDF file. In order to further investigate the matter, I have logged this incident as CELLSNET-44589. Please spare us little time to properly analyze the case. In the meanwhile, we will keep you posted with updates in this regard.

Hi,


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

We have fixed your issue “CELLSNET-44589” now.

Let us know your feedback.

Thank you.

Hi,

It looks like the labels and size are both correct now in session 0 and session 1 by setting DPI to 96. Thanks for the help!

I’m looking forward to the official release of .net4.0 version.

Thanks

Hi John,


Thank you for the confirmation. Please note, the fix will be part of the next official release of Aspose.Cells for .NET API which is scheduled by the end of next week. As soon as the official release is available for public use, you will be automatically notified via this thread.

The issues you have found earlier (filed as CELLSNET-44589;CELLSNET-44564) have been fixed in this update.


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