I’m using Aspose.Cells v23.3.0 for convert excel to image on window,but Khmer font could not display properly. I have installed Khmer font on Windows\Fonts file, and checked excel font is correct.
ImageOrPrintOptions options = new ImageOrPrintOptions();
options.CheckWorkbookDefaultFont = true;
options.DefaultFont = “Khmer OS Content”;
options.IsCellAutoFit = true;
options.OnePagePerSheet = true;
options.ImageType = Drawing.ImageType.Jpeg;
SheetRender sr = new SheetRender(sheet, options);
sr.ToImage(0, output+ “.jpg”);
Thanks for the sample code segment.
We also need your input Excel file. Please zip and attach it here. We will check your issue soon.
@yuuro,
After installing the font, we can obtain the correct results by running the following code. Please check the attachment.result.png (111.9 KB)
Workbook wb = new Workbook(filePath + "template.xlsx");
ImageOrPrintOptions options = new ImageOrPrintOptions();
options.CheckWorkbookDefaultFont = true;
options.DefaultFont = "Khmer OS Content";
options.IsCellAutoFit = true;
options.OnePagePerSheet = true;
options.ImageType = ImageType.Jpeg;
Worksheet sheet = wb.Worksheets[0];
SheetRender sr = new SheetRender(sheet, options);
sr.ToImage(0, filePath + "out.jpg");
did you add any sheetsettings code?
@yuuro
1, Could you get correct result as your excepted with codes in Khmer Font issue - #8 by John.He
2, If you has issue about adding some sheetsettings ,please share your sample project , we will check it soon.
I find the problem after version 22.9.0, It is available before this version
It’s ok, I have solved this problem. It doesn’t work on after version 22.9.0
@yuuro,
I’m glad your issue has been solved. If you have any questions, please feel free to contact us. Regarding the latest version 23.3, we are currently unable to reproduce the issue. Once we reproduce the issue, we will fix it as soon as possible.