You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@pdfbox.apache.org by Rock Lin <ab...@gmail.com> on 2017/05/25 06:01:30 UTC

How do I specify the google noto font with printed

Hi Sir:
I used the PDDocument.load(PdfInputStream) to load a PDF File.

And I want to print this PDF use google noto
font(NotoSansCJKtc-Regular.otf).(The PDF has many chinese word)

How did I do?

Thanks for your help!

Re: How do I specify the google noto font with printed

Posted by Tilman Hausherr <TH...@t-online.de>.
Am 25.05.2017 um 08:01 schrieb Rock Lin:
> Hi Sir:
> I used the PDDocument.load(PdfInputStream) to load a PDF File.
>
> And I want to print this PDF use google noto
> font(NotoSansCJKtc-Regular.otf).(The PDF has many chinese word)
>
> How did I do?

You can't, at least not out of the box. It wouldn't make sense, because 
a PDF decides itself what fonts are to be used. If the fonts are not 
embedded, then you should get the missing font and install it on your 
system. When fonts are missing, PDFBox tries to map to an existing font.

Alternatively, set your own fontmapper. To do this, download the source 
code and have a look at the implementation of FontMapperImpl. Create 
your own and install it with FontMappers.set(new MyNewFontMapper());

Tilman

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