-
I'm working on a solution that involves PDFs from multiple sources, and recently ran across a file that apparently uses Calibri as its primary font. This is resulting in errors I've seen rarely in past cases, but this file produces a huge string of them. Examples below. mupdf: FT_Get_Advance(OOFOFP+Calibri,20037): invalid glyph index The end result is that many areas of the document don't get redacted, apparently due to an inability to process the font. I've been poking at the doc, but can't find a solution (do I need to add a font package so mupdf?). This is on Windows 2019, and I do see that Calibri is installed via the OS. Ideas appreciated. |
Beta Was this translation helpful? Give feedback.
Replies: 1 comment 4 replies
-
There seems to be an error in the PDF's fontfile, which is a subset of the full Calibri font. The message reports a freetype error. To isolate the problem from any special processing in your app, you may want to try and convert it to another PDF using I am boing to notify some of the MuPDF experts, too. |
Beta Was this translation helpful? Give feedback.
My assumptiona have been confirmed by the MuPDF colleagues.
These errors and the set of others you are reporting, are badly formed / damaged PDFs.
Hard to say from my level of detail what the best approach is to handle these undoubtedly severe situations.
Messages like "'F11' is no font dict (4860 0 R)" or "cannot load object" of course indicate that the PDF contains severe damages.
Probably valid to pass such a file to human processing. It may be too risky to try programmatic repair.