You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@pdfbox.apache.org by Tim Allison <ta...@apache.org> on 2022/10/12 17:21:51 UTC

Non-embedded fonts

Hi All,
  Is there an easy-ish way for me to figure out if a PDF has
non-embedded fonts during TextStripping or otherwise?
  Thank you.

          Best,

                  Tim

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


Re: Non-embedded fonts

Posted by Tilman Hausherr <TH...@t-online.de>.
On 13.10.2022 12:40, Tim Allison wrote:
> We currently have access to PDFont in two places:
>
> 1) We're overriding showGlyph, which obv has access to PDFont.
> 2) At the end of a page, we're optionally calling
> page.getResources.getFontNames() and then iterating over font via font
> names.
>
> Is one better than another?

First one better; second one would get only the top level fonts of that 
page.

Tilman


>
> On Thu, Oct 13, 2022 at 6:21 AM Tim Allison <ta...@apache.org> wrote:
>> Thank you!
>>
>> On Wed, Oct 12, 2022 at 2:01 PM Tilman Hausherr <TH...@t-online.de> wrote:
>>> On 12.10.2022 19:21, Tim Allison wrote:
>>>> Hi All,
>>>>     Is there an easy-ish way for me to figure out if a PDF has
>>>> non-embedded fonts during TextStripping or otherwise?
>>>
>>> If you have a PDFont object in a stripper extension then you could call
>>> font.isEmbedded()
>>>
>>> Tilman
>>>
>>>
>>> ---------------------------------------------------------------------
>>> To unsubscribe, e-mail: users-unsubscribe@pdfbox.apache.org
>>> For additional commands, e-mail: users-help@pdfbox.apache.org
>>>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscribe@pdfbox.apache.org
> For additional commands, e-mail: users-help@pdfbox.apache.org
>


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


Re: Non-embedded fonts

Posted by Tim Allison <ta...@apache.org>.
We currently have access to PDFont in two places:

1) We're overriding showGlyph, which obv has access to PDFont.
2) At the end of a page, we're optionally calling
page.getResources.getFontNames() and then iterating over font via font
names.

Is one better than another?

On Thu, Oct 13, 2022 at 6:21 AM Tim Allison <ta...@apache.org> wrote:
>
> Thank you!
>
> On Wed, Oct 12, 2022 at 2:01 PM Tilman Hausherr <TH...@t-online.de> wrote:
> >
> > On 12.10.2022 19:21, Tim Allison wrote:
> > > Hi All,
> > >    Is there an easy-ish way for me to figure out if a PDF has
> > > non-embedded fonts during TextStripping or otherwise?
> >
> >
> > If you have a PDFont object in a stripper extension then you could call
> > font.isEmbedded()
> >
> > Tilman
> >
> >
> > ---------------------------------------------------------------------
> > To unsubscribe, e-mail: users-unsubscribe@pdfbox.apache.org
> > For additional commands, e-mail: users-help@pdfbox.apache.org
> >

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


Re: Non-embedded fonts

Posted by Tim Allison <ta...@apache.org>.
Thank you!

On Wed, Oct 12, 2022 at 2:01 PM Tilman Hausherr <TH...@t-online.de> wrote:
>
> On 12.10.2022 19:21, Tim Allison wrote:
> > Hi All,
> >    Is there an easy-ish way for me to figure out if a PDF has
> > non-embedded fonts during TextStripping or otherwise?
>
>
> If you have a PDFont object in a stripper extension then you could call
> font.isEmbedded()
>
> Tilman
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscribe@pdfbox.apache.org
> For additional commands, e-mail: users-help@pdfbox.apache.org
>

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


Re: Non-embedded fonts

Posted by Tilman Hausherr <TH...@t-online.de>.
On 12.10.2022 19:21, Tim Allison wrote:
> Hi All,
>    Is there an easy-ish way for me to figure out if a PDF has
> non-embedded fonts during TextStripping or otherwise?


If you have a PDFont object in a stripper extension then you could call 
font.isEmbedded()

Tilman


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