Quantcast
Channel: Aspose.Pdf Product Family
Viewing all articles
Browse latest Browse all 3131

Loading TTF fonts from a resources folder

$
0
0
Hi,

From reading through various posts I think I know the answer to this however I just want clarification. 

I am trying to use the Tahoma font when generating a PDF, however I'd preferably like to be able to just provide a path to the file which is kept within a resources folder for my application e.g. /resources/Tahoma.ttf. Is this possible?

I've also tried installing the font into my system -> Fonts and then doing:

 final Section sec1 = pdf1.getSections().add();

 sec1.getTextInfo().setFontName("Tahoma");

but this causes an error: Font 'Tahoma' not found. Please make sure the customer font file is correctly set.

Any ideas? I can use the core Aspose fonts fine, so I am making do with Helvtica for now, but I could really do with being able to use Tahoma!

Thanks,


Chris


Viewing all articles
Browse latest Browse all 3131

Trending Articles