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

Status Code : 400 "code": "CORRUPT_DOCUMENT", "message": "The input file appears to be corrupted

Community Beginner ,
May 24, 2024 May 24, 2024

Hello,

  I am trying to use Adobe API for PDF processing, but I receive an error: 


{
"error": {
"code": "CORRUPT_DOCUMENT",
"message": "The input file appears to be corrupted and cannot be processed.; requestId=09b7def5-1615-4584-9551-d925e7e12b42"
}
}


 My request body is:
  
{
"$content-type": "multipart/form-data",
"$multipart": [
{
"headers": {
"Content-Disposition": "form-data; name=\"inputFileName\""
},
"body": "OoPdfFormExample.pdf"
},
{
"headers": {
"Content-Disposition": "form-data; name=\"intent\""
},
"body": "PDF_TO_EXCEL"
},
{
"headers": {
"Content-Disposition": "form-data; name=\"targetFormat\""
},
"body": "XLSX"
},
{
"headers": {
"Content-Disposition": "form-data; name=\"InputFile0\""
},
"body": "base64Content"
}
]
}
  
  If I decode the base64Content, I can regenerate my PDF file back, so I don't think there is an issue on the file side.

  I also tried with other sample files, but everytime I have same error code in response.

 

Can I know the root cause of this issue ?

TOPICS
PDF Embed API , PDF Extract API , PDF Services API , Power Automate
5.6K
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 ,
May 24, 2024 May 24, 2024

This is not at all how the REST API works. Did you use the docs here? https://developer.adobe.com/document-services/docs/apis/

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
Community Beginner ,
May 25, 2024 May 25, 2024

Hello,

  No, I didn't use the docs you mentioned here, as I am acesssing from Azure Logic App through my clientID and token, to access path: /operation/v1/exportPDFToExcel.

  Do you also need the raw request (header & body) if the request ID isn't enough to diagnose the issue ?

  

  

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 ,
May 28, 2024 May 28, 2024

We don't support that version of the API anymore - so you are going to need to switch to the one I linked to.

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
Community Beginner ,
May 28, 2024 May 28, 2024

Please check the http request and response files attached.

It is mentioned in your official documentation :https://helpx.adobe.com/document-cloud/help/pdf-connector-for-microsoft-power-automate.html

Also the Adobe connector can be accessed as seen in screenshots attached.

  

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 ,
May 28, 2024 May 28, 2024

I'd have to see more of your Logic App to help. The error seems to imply you aren't passing the right input. Can you show a screenshot of the action UI?

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
Community Beginner ,
May 28, 2024 May 28, 2024

I am attaching screenshots for:

1. fileName UI

2. fileContents UI

3. Example Pdf file I am using

4. base64 string I get from error logs

 

The base64 string is valid, as I can regenerate the PDF file back from online tool.

So the input seems right

 

 

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 ,
May 28, 2024 May 28, 2024

Eh, it's a bit hard to read with the German I believe. First off, where are you using base64? The connector expects the binary bits, not base64.

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
Community Beginner ,
May 29, 2024 May 29, 2024

its little bit correct what you suggested, actually base64toBinary() has to be done

It would be applicable for any pdf to supported format conversion.

base64toBinary(@{items('For_each')?['ContentBytes']})

 

In case of prod technical issues, what is the support response time (SLA)  if enterprise plan is opted ?

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 ,
May 29, 2024 May 29, 2024
LATEST

You would need  an enterprise contract with us, ie, non free-tier, for that. I've got no clue whats available in that regards - your sales person would know.

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
Community Beginner ,
May 27, 2024 May 27, 2024

Request and response files are attached

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