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

Broken JSON on export

New Here ,
Nov 08, 2021 Nov 08, 2021

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.

Screenshot 2021-11-08 at 19.14.43.png

TOPICS
How to , PDF Extract API
585
Translate
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
New Here ,
Nov 09, 2021 Nov 09, 2021

Anyone?

Translate
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
Adobe Employee ,
Nov 10, 2021 Nov 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.

Translate
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
New Here ,
Nov 10, 2021 Nov 10, 2021
LATEST

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.

Translate
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
Resources