Using Calibri font in pdf - C#

Hi,


I want to use calibri font to the pdf which i’m generating using C#.net. Can you please send me a sample on how to implement this.I’m using Xml template, and font is handled in c# code. As of now to use Times roman font i’m using the below code.

///
((Text)cell_Child.Paragraphs[0]).Segments[0].TextInfo.FontName = “Times-Italic”;




Regards,
Ezhil

Hi
Ezhil,


Thanks for your interest in our products.

Please visit the following link for required information on Fonts embedding while creating PDF

In case you still face the same problem, please share the source XML file and the code snippet which you are using so that we can test the scenario at our end. We are sorry for this inconvenience.

Hi,


I’m using aspose.pdf version 4.2. I dont have the aspose.pdf.generator namespace in it.How could i acheive the funtionality.


Regards,
Ezhil

Hi Ezhil,


Please note that the Generator namespace was introduced in Aspose.Pdf for .NET since the release of version 6.0.0. As you have been using v4.2, simply remove Generator from the code lines and try executing the code. You may consider visiting the following link for instructions on Migration from Aspose.Pdf Pre-6.x (In your case, the order will be reversed).