Hello There,
I am loading a document in Aspose.Cells.Workbook ( Version=22.5.0.0) and changing the custom font of sheet then trying save to PDF but its not changing the font in output PDF file.
Below is my code.
var wb = new Aspose.Cells.Workbook("FilePath");
var sheet1 = wb.Worksheets[0];
FontConfigs.SetFontSources(new FontSourceBase[] { new Aspose.Cells.MemoryFontSource(System.IO.File.ReadAllBytes("C:\\Users\\MyUser\\Downloads\\ot_ttf\\Dubai-Medium.ttf")) });
FontConfigs.DefaultFontName = "Dubai Medium";
var style = sheet1.Cells["A3"].GetStyle();
style.Font.Name = "Dubai Medium";
style.Font.Color = System.Drawing.Color.Green;
sheet1.Cells["A3"].SetStyle(style);
sheet1.Cells[$"A16"].Value = "RemainingPayment";
sheet1.Cells[$"E16"].Value = "AmountToSpent";
sheet1.Cells[$"A17"].Value = "InvoiceNumber";
wb.Save("C:\\Users\\Test.pdf", Aspose.Cells.SaveFormat.Pdf);
Can you please help if I am missing anything.