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
Copy link to clipboard
Copied
So I came across PDFontWasFauxed is this a safe bet to detect missing font?
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?
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
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.
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.
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 🙂
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.
Copy link to clipboard
Copied
Thanks!