anatolip
Thanks for the search PDF functionality. I was wondering if something has changed with the API. When trying to download the searchable PDF generated I am getting a 404. The functionality was working fine a few days ago, but something seems to have changed. Here are the curl commands I have used
1. POST to Start the Analysis:
curl -X POST "https://<YOUR-ENDPOINT>.cognitiveservices.azure.com/documentintelligence/documentModels/prebuilt-read:analyze?output=pdf&api-version=2024-07-31-preview" \
-H "Content-Type: application/json" \
-H "Ocp-Apim-Subscription-Key: <YOUR-AZURE-KEY>" \
--data-ascii '{"urlSource": "https://<YOUR-FILE-URL>.pdf"}'
The analysis starts successfully and returns a 202 Accepted response with an operation-location header, which contains the URL to check the status of the operation.
2. GET to Poll for the Analysis Status:
curl -H "Ocp-Apim-Subscription-Key: <YOUR-AZURE-KEY>" \
"https://<YOUR-ENDPOINT>.cognitiveservices.azure.com/documentintelligence/documentModels/prebuilt-read/analyzeResults/<RESULT-ID>?api-version=2024-07-31-preview"
After polling, I receive a "succeeded" status, indicating that the analysis has completed successfully.
This is where the problem happens
curl -H "Ocp-Apim-Subscription-Key: <YOUR-AZURE-KEY>" \
"https://<YOUR-ENDPOINT>.cognitiveservices.azure.com/documentintelligence/documentModels/prebuilt-read/analyzeResults/<RESULT-ID>/pdf?api-version=2024-07-31-preview" \
--output results.pdf
This request returns a 404 Not Found error. I am unable to retrieve the PDF, despite the analysis showing as "succeeded".
Any ideas as to what I may be missing