Chart title broken when generating image

Hi,

Please use my code below:

using (var ms = new FileStream("/tmp/chart-of-anothersheet.xlsx", FileMode.OpenOrCreate, FileAccess.Read))
{
using (var workbook = new Workbook(ms))
{
Worksheet worksheet = workbook.Worksheets[0];
worksheet.PageSetup.PrintArea = “A1:N50”;

				// Set all margins as 0
				worksheet.PageSetup.LeftMargin = 0;
				worksheet.PageSetup.RightMargin = 0;
				worksheet.PageSetup.TopMargin = 0;
				worksheet.PageSetup.BottomMargin = 0;

				// Set OnePagePerSheet option as true
				ImageOrPrintOptions options = new ImageOrPrintOptions();
				options.OnePagePerSheet = true;
				options.ImageType = Aspose.Cells.Drawing.ImageType.Png;
				options.OnlyArea = true;
				options.HorizontalResolution = 90;
				options.VerticalResolution = 90;
				SheetRender sr = new SheetRender(worksheet, options);
                                    sr.ToImage(0, "/tmp/" + Guid.NewGuid() + ".png");
			}
		}

And attached file chart-of-anothersheet.xlsx.zip (12.1 KB)

Please advise as it only broken on Linux (I installed all necessary fonts from Windows already)

@Kevinng85,

Could you please share output image and version of your Linux for our reference.

hi,

My Linux
Linux ip-10-10-74-201 4.15.0-1009-aws #9-Ubuntu SMP Wed May 16 15:22:54 UTC 2018 x86_64 x86_64 x86_64 GNU/Linux

The output
db7ed5da-0d67-424f-b918-58a73bea4d25.png (13.9 KB)

@Kevinng85,

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

CELLSNETCORE-20 - Chart title is broken when rendered to image

@Kevinng85,

We found this problem happens in linux because the Drawing lib displays differentl than in windows. We will provide a fix for your issue to work with linux title drawing. We will provide the fixed version soon.

Sorry for brining a lot of stuffs in the new year.
Please also take a look at this sample as well

NPS Monthly Report 2018-Sept.xlsx.zip (53.6 KB)

The chart also broken

Screen Shot 2019-01-03 at 4.59.48 PM.jpg (294.7 KB)

@Kevinng85,

Thanks for providing more sample files. We have observed the issue using above sample XLSX file and logged it with the ticket for later reference. We will consider this sample file for our analysis on its turn.

@Kevinng85,

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

Your issue should be fixed in it.

Let us know your feedback.

Aspose.Cells18.12.9 For .NetStandard20.Zip (3.8 MB)

hi @ahsaniqbalsidiqui
Thank you for you effort. The new dll did not fix 100% problem.

Regarding 2 sample above
Only NPS Monthly Report 2018-Sept.xlsx.zip works well with title not broken.

The chart-of-anothersheet.xlsx.zip does not work, please see my attachment

3a80dc79-32fc-476c-81b1-90762edf790f.png (33.2 KB)

Again, I am using Ubuntu 18.04.1 LTS

@Kevinng85,

Thanks for the feedback. We have observed the issue with the file “chart-of-anothersheet.xlsx” and are analyzing it. We will write back soon once any feedback is ready to provide here.

@Kevinng85,

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

Your issue should be fixed in it.

Let us know your feedback.
Aspose.Cells for .NET (Latest Version)

hi @ahsaniqbalsidiqui

Great job, this fix the error with broken title.

@Kevinng85,

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.