Skip to main content
Participant
November 8, 2021
Question

Broken JSON on export

  • November 8, 2021
  • 1 reply
  • 545 views

I'm trying to extract data from a PDF using Extract PDF API. I got authorisation, submission and polling working fine. However, polling returns a broken file with a JSON in the midst of it. I'm not sure how to get rid of the broken parts and just return a JSON with the text from the PDF. Has anyone faced an issue like that?

Unfortunately, I can't attach the real file because the forum won't let me.

This topic has been closed for replies.

1 reply

Robert_MAuthor
Participant
November 9, 2021

Anyone?

Raymond Camden
Community Manager
Community Manager
November 10, 2021

So it looks like you are using the REST API directly - any reason why you aren't using one of the SDKs? The response from the REST API is a multipart form response so if you don't decode it correctly, you may get what you are seeing above.

Robert_MAuthor
Participant
November 10, 2021

Thanks for the response, my environment doesn't allow me to install any SDKs, so I need to resort to using REST directly. I figured out how to get gid of most of the unnecessary stuff in the file, but I'm still getting multipart. Is there a reason why REST wouldn't return a simple JSON, so that it's more usable on the web? If not, is there a way around it? I just need a JSON from the output and nothing else.