How to download PDF after API conversion
Hi,
I've been trying to use Adobe PDF Services API to transform a .docx to .pdf. I used the exemple Postman colection following the given steps (https://documentcloud.adobe.com/document-services/index.html?_gl=1*1ckwf6v*_gcl_aw*R0NMLjE2NTQ3ODE0MDEuQ2p3S0NBand0SWFWQmhCa0Vpd0FzcjctYzhVbUdFY05UcjJ0NmFjenZNNXRpQzVuOHFvRHRROENuOE1BenlHNUJTLV9yYm5zSWJySmdob0NMeWtRQXZEX0J3RQ..#how-to-get-started-) and it seems to work fine. The problem is that I can't manage to get the pdf from the response. It seems to have a PDF in octet-stream, but no matter how I try to save it, I don't get a PDF.
For exemple, if I try to save all the response body and change the file name to .pdf, it opens a PDF with the right number of pages, but completly empty. That happens even if I keep only the part between %PDF-1.7 and %%EOF in the file.
The response I get from the GET request has the following structure in the body:
--Boundary_96548_2076176993_1654878435333
Content-Type: application/json
Content-Disposition: form-data; name="contentAnalyzerResponse"
{"cpf:inputs":{"documentIn":{"cpf:location":"InputFile0","dc:format":"application/vnd.ms-excel"}},"cpf:engine":{"repo:assetId":"urn:aaid:cpf:Service-1538ece812254acaac2a07799503a430"},"cpf:status":{"completed":true,"type":"","status":200},"cpf:outputs":{"documentOut":{"cpf:location":"multipartLabel","dc:format":"application/pdf"}}}
--Boundary_96548_2076176993_1654878435333
Content-Type: application/octet-stream
Content-Disposition: form-data; name="multipartLabel"
%PDF-1.7
%����
26 0 obj
<</Linearized 1/L 49046/O 29/E 44186/N 1/T 48406/H [ 576 164]>>
endobj
------------------------A LOT OF BROKEN LINES (SEEMS LIKE A DOCUMENT)-------------------
%%EOF
--Boundary_96548_2076176993_1654878435333--
Ps: I tried the same thing in python and got same error. I also tried with a .xlsx file, same thing.
If someone can give me some light, thank you very much!
