Hello Support,
We have a lic for AsposeTotal and are trying to save Excel file with text in custom fonts as PDF document. We noticed that everything on the spreadsheet is being substituted with a different font. Referenced fonts are installed on the machine.
Aspose.Cells version: 17.9.0.0, Runtime version: v4.0.30319
MS Visual Studio 2013 version: 12.0.30110.00 Update 1
MS.NET
Framework version: 4.5.51650
C# code:
string filePath = @“C:\install\source.xlsx”;
string fileDir = @“C:\install”;
Aspose.Cells.FontConfigs.SetFontFolder(@“C:\install\BrandingFonts”, false);
Workbook workbook = new Workbook(filePath);
workbook.Save(fileDir + “source.pdf”, Aspose.Cells.SaveFormat.Pdf);
// workbook.Save(fileDir + “source.pdf”); //doesn’t work either
If we try to insert a TextStamp into existing PDF and explicitly set its font using code line below it works, but if we simply save existing Excel into PDF all fonts are replaced with either Arial or Calibri.
myTextStamp.TextState.Font = Aspose.Pdf.Text.FontRepository.FindFont(“Alright Sans Regular”);
It seems that Aspose.Pdf recognizes custom fonts and Aspose.Cells does not. Could you please explain in details how to solve this issue?
Attached are two files: source_xlsx.jpg and resulting source.pdf
source.pdf (25.5 KB)
source_xlsx.jpg (72.6 KB)
Thank you,
Alex