Image generation with word embed failed in linux

Please see my code to generate image

using (var ms = new FileStream("/tmp/excel+word.xlsx", FileMode.OpenOrCreate, FileAccess.Read))
			{
				ms.Position = 0;
				using (var workbook = new Workbook(ms))
				{
					Stopwatch s = new Stopwatch();
					s.Start();
					Worksheet worksheet = workbook.Worksheets[0];
					worksheet.PageSetup.PrintArea = "A1:I50";

					// 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);
					using (var msImg = new MemoryStream())
					{
						sr.ToImage(0, msImg);
						//Console.WriteLine(Convert.ToBase64String(msImg.ToArray()));
						//Convert.ToBase64String(msImg.ToArray());
						sr.ToImage(0, "/tmp/" + Guid.NewGuid() + ".png");
					}
					s.Stop();
					Console.WriteLine(s.ElapsedMilliseconds);
				}
			}

Attached is the error file excel word.xlsx.zip (92.3 KB)

I can run it under windows but under Linux (Ubuntu) it failed
Screen Shot 2018-12-27 at 5.03.51 PM.png (66.1 KB)

Could you shed some light on this?

@Kevinng85,

Thanks for your query.

I have tried this scenario using latest version Aspose.Cells for .NET Core 18.12.0 and get the warning message “Fontconfig warning: ignoring UTF-8: not a valid region tag”. However no exception is raised and output image is created successfully. Could you please test this scenario with the latest version and provide your feedback?

Hi,
Can you share the OS you tested?

I have tried the latest lib (18.12.0) on my Linux:
4.15.0-43-generic #46-Ubuntu SMP Thu Dec 6 14:45:28 UTC 2018 x86_64 x86_64 x86_64 GNU/Linux

@Kevinng85,

I tested this issue in MacOS, however I have logged an investigation ticket for Linux environment. Once, we will have some news for you, we will update you in this topic.

This issue has been logged as

CELLSNETCORE-19 - Exception while renedering Excel file to image

@Kevinng85,

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

Your issue should be fixed in it. We tested it on Ubuntu 16.04(64bit) using Aspose.Cells 19.1.1, there are no warning messages now and the png can be created correctly.

Let us know your feedback.
https://www.dropbox.com/s/t6jazo4vqtul43b/Aspose.Cells19.1.1%20For%20.NetStandard20.Zip?dl=0

hi @Amjad_Sahi

Sorry I have to say this lib does not fix the issue. Please see my attachment

Screenshot from 2019-01-23 21-01-09.png (44.9 KB)

@Kevinng85,

Thanks for the screenshot.

I have logged it against your issue into our database. We will evaluate your issue further and look into it soon.

@Kevinng85,

We have tried this scenario again using latest version but afraid to share that we are unable to reproduce it. The image is created fine. You may please verify that you are using latest version. If confirmed, please share your environment details with us and steps to reproduce this issue here.

@Kevinng85,
This is to inform you that we have fixed your issue now. We will soon provide you the fixed version after performing QA and incorporating other enhancements and fixes.