• Global community
    • Language:
      • Deutsch
      • English
      • Español
      • Français
      • Português
  • 日本語コミュニティ
    Dedicated community for Japanese speakers
  • 한국 커뮤니티
    Dedicated community for Korean speakers
Exit
0

Is it possible to determine missing fonts (psname and the font format) in a pdf file

Community Beginner ,
Jul 10, 2021 Jul 10, 2021

Copy link to clipboard

Copied

I am writing a plugin and I cant seem to find a way in sdk to determine if the document has missing fonts

I also looked at the info regarding to the font format for a Font and could not find a way beyond CID fonts

TOPICS
Acrobat SDK and JavaScript , Mac , Windows

Views

461

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Community Beginner ,
Jul 10, 2021 Jul 10, 2021

Copy link to clipboard

Copied

So I came across PDFontWasFauxed is this a safe bet to detect missing font?

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
LEGEND ,
Jul 10, 2021 Jul 10, 2021

Copy link to clipboard

Copied

What specifically and exactly do you mean by a "missing font"? I am not sure this concept actually exists in a PDF. Do you mean the PDF is fine but the font is neither embedded, nor available to the system?

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Community Beginner ,
Jul 10, 2021 Jul 10, 2021

Copy link to clipboard

Copied

A font is not included in the document when it is saved

 

Also I cant find this function in the DC Sdk but mentioned in the documentation

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
LEGEND ,
Jul 10, 2021 Jul 10, 2021

Copy link to clipboard

Copied

A font is always included in the PDF, otherwise it cannot be used. Do you mean that it is not EMBEDDED?

 

PDFontWasFauxed is in the PDF Library only, not the plug-in SDK. I don't know why.

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
LEGEND ,
Jul 10, 2021 Jul 10, 2021

Copy link to clipboard

Copied

Also.. even with the API... a font would not be fauxed if it is found in the system. Perhaps you need to explain your use case rather than use technical terms which may not be exactly correct.

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Community Beginner ,
Jul 11, 2021 Jul 11, 2021

Copy link to clipboard

Copied

I can create a pdf where while saving a pdf doc, one can unembed fonts

This way we can create a pdf which we open on another machine, will not be properly rendered

 

I am creating a plugin which can detect which exact fonts are missing in the document

I will be able to use the detected data and then activate the fonts from my font inventory

 

Thanks for the interest 🙂

 

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
LEGEND ,
Jul 12, 2021 Jul 12, 2021

Copy link to clipboard

Copied

Ok, so it is non-embedded fonts you want to detect. I can think of two ways. 

1. Enumerate pages, enumerate all text runs, check PDEFont for embedding flags.

2. Enumerate all font dictionaries in all Resources dictionaries (recursively into Form XObjects etc.), checking the FontFileXXX values in font attribute dictionaries.

 

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Community Beginner ,
Jul 15, 2021 Jul 15, 2021

Copy link to clipboard

Copied

LATEST

Thanks!

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines