pdfbox-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Andreas Lehmkühler <andr...@lehmi.de>
Subject Re: detect if font is embedded
Date Fri, 16 May 2014 10:12:02 GMT
Hi,

> Cornelis Hoeflake <c.hoeflake@postex.com> hat am 9. Mai 2014 um 09:19
> geschrieben:
>
>
> Hi,
>
> Is there a way to list all fonts used in the PDF and whether they are
> embedded or not. I know the PDPage.getResources().getFonts(). But that is
> not enough for detecting if the font is embedded.
You have to dig a little bit deeper.

- check if the font has a font descriptor, no -> font is not embedded
- if there is a font descriptor, check if there is a FontFile | FontFile2 |
FontFile3 entry, no -> font is not embedded, yes -> font is embedded
- the font has a DescendantFont entry, check the font descriptor of the
descendant font, FontFile2 | FontFile3 exists ->  font is embedded, otherwise
not


> Met vriendelijke groet,
>
> Cornelis Hoeflake
>


BR
Andreas Lehmkühler

Mime
View raw message