pdfbox-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From John Hewson <j...@jahewson.com>
Subject Re: how to change the font color
Date Wed, 18 Nov 2015 19:31:39 GMT

> On 15 Nov 2015, at 21:44, kevin <send60@126.com> wrote:
> 
> hi,everyone!
> 
> 
> I'm newbee and using the pdfbox to create the pdf document recently.
> I can see the way to change the font size below:
> 
> 
> ---
> ...
> PDType0Font font = PDType0Font.load(document, new File(dir + "sample.ttf"));
> stream.setFont(font, 12);
> ...
> --
> 
> 
> is there a way for change the font color or font style(italy,bold,etc.) ?

Different font styles are in separate font files, e.g. “Arial.ttf”, “Arial Bold.ttf”.

— John

> Thanks in advance!


---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@pdfbox.apache.org
For additional commands, e-mail: users-help@pdfbox.apache.org


Mime
View raw message