Hi Arnon,
Thanks for your posting and using Aspose.Cells.
Please provide us your Excel file which should contain text with all of your desired fonts and then provide us your MS-Excel generated PDF and Aspose.Cells generated PDF and also provide us your fonts.
Please see the File with Fonts.xlsx attached for your reference. We need a similar file.
We will look into your issue and fix it in our future versions. Thanks for your cooperation.
I noticed that adding a charset attribute tag to the font tag in the styles.xml inner file inside the output xlsx file fixes the problem. For example, this change fixes the problem to the David font:
How Aspose.Cells exports (not good):
After adding charset 177 (works good):
After this change the font is visible and looks good.
For your request, I am attaching:
-
An excel file generated by aspose .cells with the font problem - fontlist_aspose.xlsx.
-
A pdf version of the aspose generated file - fontlist_aspose.pdf.
-
An excel file generated by MS Excel that looks good (all the Hebrew fonts are visible) - fontlist_msExcel.xlsx.
-
A pdf version of the aspose generated file - fontlist_ msExcel.pdf.
-
4 zip files containing all the fonts I used in the example files – fonts_1.zip , fonts_2.zip , fonts_3.zip , fonts_4.zip**.**
This is the source code I use to generate the fontlist_aspose.xlsx file:
IList<string> fontNames = FontFamily.Families.Select(f => f.Name).ToList();
Workbook workbook = new Workbook();
WorksheetCollection sheets = workbook.Worksheets;
Cells cells = sheets[0].Cells;
cells["A1"].PutValue("Font Name");
cells["B1"].PutValue("Latin Text");
cells["C1"].PutValue("Hebrew Text");
int r = 2;
foreach (string fn in fontNames)
{
cells["A" + r.ToString()].PutValue(fn);
cells["B" + r.ToString()].PutValue("Latin Text");
cells["C" + r.ToString()].PutValue("טקסט בעברית");
Style style = cells["C" + r.ToString()].GetStyle();
style.Font.Name = fn;
cells["C" + r.ToString()].SetStyle(style);
style = cells["B" + r.ToString()].GetStyle();
style.Font.Name = fn;
cells["B" + r.ToString()].SetStyle(style);
r++;
}
workbook.Save(@"c:\temp\fontlist_aspose.xlsx", SaveFormat.Xlsx);
Notice that I need a solution not just for a specific font but for all the Hebrew fonts range.
Waiting for your answer,
Arnon
Hi Arnon,
Hi Arnon,
Thanks for your using Aspose.Cells.
Please download and try the latest fix: Aspose.Cells for .NET v8.2.2.2 and let us know your feedback.
The issues you have found earlier (filed as CELLSNET-43128) have been fixed in this update.
This message was posted using Notification2Forum from Downloads module by Aspose Notifier.