Well, you can use the predefined PDFBox fonts, like this :
PDSimpleFont font = PDType1Font.TIMES_ITALIC;

Or you can define your own font file, ex :
PDTrueTypeFont font = PDTrueTypeFont.loadTTF( pdfFile, new File( 
"fonts/georgia.TTF" ) );

But replace this font file in the example with a bold or italic font file.

Best regards ,
Hesham 

---------------------------------------------
Included message :

> Hi, Dear All,
>  Is there a way to set the font styles of the text added to the PDF such as 
> Bold and Italic?
>  I'm new to PDFBox, and while I searched for such topics in the existing 
> mailing list I got one result about this but can open it.
>  Any help will be appreciated.
> 
> Thanks!
>

Reply via email to