Free Support Forum - aspose.com

Image rendered from chart has different font style from the original file in the latest Aspose.Cells

Hi,



I upgraded Aspose.Cells from 8.9.0 to 17.3.0 today and noticed the chart’s text font style was no longer respected when rendering.



Code:

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

Worksheet sheetBold = bookBold.Worksheets[0];

sheetBold.Charts[0].ToImage(@“test.emf”);



I’ve attached the test.xlsx file and both image outputs from Aspose.Cells 8.9.0 and 17.3.0. You can find the text in test17.3.0.emf had a different style from the original excel file (it’s thinner in the emf), while test8.9.0.emf looked just fine.



Could you help me check if there’s any regressions?



Thanks

Hi,


Thanks for the template file and image files.

Please try our latest fix/version: Aspose.Cells for .NET 17.3.4:

Aspose.Cells for .NET v17.03.4 (.NET 2.0) compiled in .NET Framework 2.0.
Aspose.Cells for .NET v17.03.4 (.NET 4.0) compiled in .NET Framework 4.0.
(Note: please choose any of the fixes for your underlying .NET framework version)

I have tested your scenario/ case using your template file and sample code with v17.3.4, it works fine and as expected.

Let us know if you still have any issue.

Thank you.

Hi,



I took some time to test with the 17.03.4 and the issue still remains.



To make it more obvious I have updated and attached the test file with a 2-line title in the chart. I’ve attached a screenshot for this issue as well.



Could you help me look into this?



Thanks

FYI we used the font Generis Sans Com for the chart text.

Thanks

Hi,


Thanks for the screenshots and file.

I reckon your both screenshots are same, see the screenshot for your reference:
http://prntscr.com/epv50u

It looks like we got to use zoom lenses to identify any significant or subtle difference (if there is any). Anyways, we still think the output image by our newer versions are ok (same as the original chart) and we might not enhance it.

Thank you.

Hi,



Thanks for your reply.



The images looked very different from the output I could produce.



The issue on my side seemed to happen only when I used Generis Sans Com. Could you confirm this font had been installed in your test machine? (You can verify this by opening the excel file to see if the title is in Generis Sans Com)



Thanks very much

Hi,


It looks like a missing font issue, the “Generis Sans Com” font is not installed on my pc, so Aspose.Cells would substitute some other similar font to render the title (Truetype fonts (used in the workbook) are needed when rendering spreadsheet to PDF/images). Could you also check if the font is installed on your system, if not, please install the font before rendering to image file, it should work fine.

Thank you.

Hi,



The font is installed on my system.



When I used the previous version 8.9.0 it could render the image correctly. But when I used 17.3.0 to render using the same PC under the same configuration the output was different and incorrect.



Thanks

Hi,


Could you give me the font truetype font “Generis Sans Com” file, I will evaluate your issue soon.

Also, provide us the output PDF file which you can render on your end by v17.3.x.

Thank you.

Hi,



I have attached the truetype font files as well as the pdf outputs from both Workbook.Save(“xx.pdf”) and chart.ToPdf(“xx.pdf”) methods.



Thanks

Hi,


Thanks for providing us font files and sample files.

I have installed your all fonts on my pc (OS: Windows 8) and then use the following sample code to render image file and PDF file, it works fine and as expected. It looks like not all your provided fonts are installed on your machine, so you are rendering different output. Please find attached the zipped archive containing the output image and PDF file and check if these are fine tuned:
e.g
Sample code:

var bookBold = new Workbook(“E:\test2\image rendered from chart1\test.xlsx”);
Worksheet sheetBold = bookBold.Worksheets[0];
sheetBold.Charts[0].ToImage(“E:\test2\image rendered from chart1\out1image1.emf”);
bookBold.Save(“E:\test2\image rendered from chart1\out1pdf1.pdf”);

Thank you.

Hi,



Thanks for testing and providing me the files.



I’ve checked the samples and I noticed the result in pdf and image are different (the font in pdf is correct while in the image it is wrong).



I also noticed the percentage number is missing in pdf.



I’ve attached the screenshot for your reference. If the image you produced earlier in the screenshot is still different from what you saw in your pc, could you please provide the screenshot for me?



Thanks very much

Hi,

Thanks for providing us further details and screenshot.

We did evaluate your issue further. We are able to reproduce the issue when parsing output emf file and found that font is changed in the output image/PDF from Aspose.Cells 8.9.0 to 17.3.0 for your template file. Your recent concerns are also logged and may be it is again due to changed attributes of the font "Generis Sans Com" used.

I have logged a ticket with an id "CELLSNET-45265" for your issue. We will look into it soon.

Once we have an update on it, we will let you know here.

Thank you.

Hi,


Please try our latest fix/version:

Aspose.Cells for .NET v17.3.6 (.NET 2.0) compiled in .NET Framework 2.0.
Aspose.Cells for .NET v17.3.6 (.NET 4.0) compiled in .NET Framework 4.0.

The font changed problem should be fixed in it. Let us know your feedback.

We have also created a separate ticket (sub-task) for your recent concerns:
CELLSNET-45272 - Font is different and percentage sign is missing in the output PDF file

Once we have an update on it, we will let you know here.

Thank you.
Hi,

Amjad Sahi:
We have also created a separate ticket (sub-task) for your recent concerns:
CELLSNET-45272 - Font is different and percentage sign is missing in the output PDF file

Please try our latest fix/version: Aspose.Cells for .NET v17.3.9:

Aspose.Cells for .NET v17.3.9 (.NET 2.0) compiled in .NET Framework 2.0.
Aspose.Cells for .NET v17.3.9 (.NET 4.0) compiled in .NET Framework 4.0.
(Note: please choose any of the fixes for your underlying .NET framework version)

Your issue should be fixed in it.

Let us know your feedback.

Thank you.

The issues you have found earlier (filed as CELLSNET-45265;CELLSNET-45272) have been fixed in Aspose.Cells for .NET 17.4.0.


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

The issues you have found earlier (filed as ) have been fixed in this update. This message was posted using BugNotificationTool from Downloads module by MuzammilKhan