I have a web application which uses the aspose pdf component to genearate a new pdf. however I would like to specify a custom font for some text in the pdf. this font is available on a specific location on the web server (eg : C:\AAI\Fonts\GOTHICB.TTF ). Could you point me to any piece of code, which can achieve this funtionality
In case you need to use some specific font file with a text object, please try using the following code lines:
TextFragment tf = new TextFragment("The quick brown fox jumps over a lazy dog. 1234567890");
tf.TextState.Font = FontRepository.OpenFont("D:\\Recent Working\\OpenSans-Regular.ttf");
page.Paragraphs.Add(tf);
In case you still face any problem, please feel free to share.