window环境下成功把excel转成了图片,但是越南文有些显示是错误的,字体是已经下载到windows\fonts文件夹下了,excel里面的字体也是正常显示,但是转图片文字就不对了
@yuuro,
@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");
你有设置一些sheet的样式吗,为什么我转图片就不对了