Skip to main content
emilyw64985397
Participant
Apr 15, 2024 7:19 PM UTC
Answered

Extract PDF API returns BAD_PDF_UNSUPPORTED_FONT

I've created a PDF using Adobe InDesign and was attempting to extract the text from the PDF using the API.  However, I'm getting the following error:

  • Known exception encountered while executing operation ServiceApiError: BAD_PDF - Unable to extract content.: The input file contains font data that is corrupted or not supported

 

Then further down:

  • BAD_PDF_UNSUPPORTED_FONT

 

 

When I use the Export PDF API to turn the PDF file into a MSWord .docx file, then use Word to print to PDF, and try the Extract PDF API on the modified pdf file, I dont encounter the same problem.

Does anyone know of a way to make the Extract API more forgiving?  IE Allowing me to get the desired result without jumping through additional hoops?   Or why the original PDF has been generated in a way that the Extract API doesnt like the font metadata.

This topic is closed to new replies. Start a new post to keep the conversation going.
emilyw64985397
emilyw64985397Correct answer
Participant
Apr 15, 2024 11:44 PM UTC

An example PDF is attached.

6 replies

emilyw64985397
emilyw64985397AuthorCorrect answer
Participant
Apr 15, 2024 11:44 PM UTC

An example PDF is attached.

Translate
Joel Geraci
Community Expert
Community Expert
Apr 17, 2024 11:25 PM UTC

There are, in fact, a ton of font errors in this PDF. Exporting to Word uses a different tool which is why it can be read.

Translate
emilyw64985397
Participant
Apr 23, 2024 5:54 AM UTC

Thanks for taking a look Joel.  There's a couple of things that don't seem right to me about this:

  • Why would InDesign allow the creation of a PDF file with so many errors in it?
  • And why does the Extract API care about the errors?
    • It's primary purpose is to extract text from the PDF so refusing to handle a PDF that looks  valid to an end user doesnt feel like a robust enough system to be generally useful.
Translate
Joel Geraci
Community Expert
Community Expert
Apr 15, 2024 10:30 PM UTC

Can you share the PDF in question?

Translate
emilyw64985397
Participant
Apr 15, 2024 11:45 PM UTC

Hi Joel,  I've added a copy of the knitting pattern called "flax sweater" as a separater reply to my original post.

Translate