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

PDF Extract Service API fails with Error Code 400 BAD_PDF_FILE_TYPE

Community Beginner ,
Dec 31, 2022 Dec 31, 2022

Copy link to clipboard

Copied

Hello, I am creating a workflow in n8n.io to automatically convert PDFs using the Extract Service API.

My problem is that no matter which pdf document I upload I always get the following error message from the API server:

 

 

[
{
"body":{
"error":{
"code":"BAD_PDF_FILE_TYPE",
"message":"BAD_PDF - Unable to extract content.: The input file is not a PDF file",
"status":400
},
"status":"failed"
},
"headers":{
"server":"openresty",
"date":"Sat, 31 Dec 2022 11:23:41 GMT",
"content-type":"application/json;charset=UTF-8",
"content-length":"152",
"connection":"close",
"x-request-id":"OqxZOhbXq4jkY7HcTsfK2QxftFbaE4fw"
},
"statusCode":200,
"statusMessage":"OK"
}
]

 

 

When I send the API call "Get asset metadata" I get the following response:

 

[
{
"body":{
"entity":"02A1570D63AF3AED0A495FA9@techacct.adobe.com",
"type":"application/pdf",
"size":20842
},
"headers":{
"server":"openresty",
"date":"Sat, 31 Dec 2022 11:28:02 GMT",
"content-type":"application/json;charset=UTF-8",
"content-length":"94",
"connection":"close",
"x-request-id":"kN9dtQUe3EmfWCkG4b4wsatTcaCensx6"
},
"statusCode":200,
"statusMessage":"OK"
}
]

 

The file size shown in the response matches the size of the file I uploaded and also the type is application/pdf. So it seems to me that the file was correctly uploaded.

The upload to the server is done as binary payload in Step2 mentioned here:

https://developer.adobe.com/document-services/docs/overview/pdf-services-api/howtos/api-usage/

 

My current workflow in n8n.io

Bildschirmfoto 2022-12-31 um 12.40.23.png

The PDF Document I use for testing is also attached.

 

What am I doing wrong, where is the mistake?

 

TOPICS
Bug , PDF Extract API , PDF Services API , REST APIs

Views

3.3K

Translate

Translate

Report

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

correct answers 1 Correct answer

Adobe Employee , Jan 03, 2023 Jan 03, 2023

Can you share details of how you create the job?

Votes

Translate

Translate
Adobe Employee ,
Jan 03, 2023 Jan 03, 2023

Copy link to clipboard

Copied

Can you share details of how you create the job?

Votes

Translate

Translate

Report

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 ,
Jan 09, 2023 Jan 09, 2023

Copy link to clipboard

Copied

Thanks for the hint with the job creation!!! I have used in the HTTP Request Body a static Asset ID along with the options... this was the Issue. Changed it so that it uses now the asset id created at file upload and now it works! Thanks a lot for pointing me into this direction.

 

Bildschirmfoto 2023-01-09 um 23.23.32.png

Votes

Translate

Translate

Report

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 28, 2023 Nov 28, 2023

Copy link to clipboard

Copied

LATEST

Did you ever get this fully working?

Votes

Translate

Translate

Report

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