How to add fonts to iText Java API?In which file of source code I have to make changes to add my set of fonts which is located on my system in .ttf format?
Asked
Active
Viewed 985 times
1 Answers
1
Try this:
BaseFont base = BaseFont.createFont("c:/windows/fonts/arial.ttf", BaseFont.WINANSI);
Font font = new Font(base, 11f, Font.BOLD);
See the BaseFont class too

CloudyMarble
- 36,908
- 70
- 97
- 130
-
-
-
thank u..but please be specific...In which file of the source i have to change??? – sagar Feb 15 '13 at 09:05
-
-
so why do you need a different font? anyway you can write the code in your extraction methode. – CloudyMarble Feb 15 '13 at 09:51