Issue with Generating Searchable PDF using Azure Document Intelligence API
I am experiencing an issue with the Azure Document Intelligence API and need your assistance.
I am trying to use the following cURL command to analyze a PDF file and generate a searchable PDF:
However, this command fails with an error. In contrast, a similar command for analyzing an image file works successfully:
Issue Description:
Why does the command to analyze a PDF file fail while the command to analyze an image file succeeds?Are there specific configurations or formats required for processing PDF files?Could you provide any recommendations or solutions to successfully generate a searchable PDF?
Thank you for your assistance!
Additional Information:
API Endpoint: %DI_ENDPOINT%API Key: %DI_KEY%Request URL (Image): https://raw.githubusercontent.com/Azure-Samples/cognitive-services-REST-api-samples/master/curl/form-recognizer/rest-api/read.png
I am experiencing an issue with the Azure Document Intelligence API and need your assistance.I am trying to use the following cURL command to analyze a PDF file and generate a searchable PDF: bash複製程式碼curl -i -X POST “%DI_ENDPOINT%/documentintelligence/documentModels/prebuilt-read:analyze?output=pdf&api-version=2024-02-29-preview” -H “Content-Type: application/json” -H “Ocp-Apim-Subscription-Key: %DI_KEY%” -d “{“urlSource”: “<PDF_FILE_URL>”}” However, this command fails with an error. In contrast, a similar command for analyzing an image file works successfully: bash複製程式碼curl -i -X POST “%DI_ENDPOINT%/documentintelligence/documentModels/prebuilt-read:analyze?api-version=2024-02-29-preview” -H “Content-Type: application/json” -H “Ocp-Apim-Subscription-Key: %DI_KEY%” –data-ascii “{‘urlSource’: ‘https://raw.githubusercontent.com/Azure-Samples/cognitive-services-REST-api-samples/master/curl/form-recognizer/rest-api/read.png’}” Issue Description:Why does the command to analyze a PDF file fail while the command to analyze an image file succeeds?Are there specific configurations or formats required for processing PDF files?Could you provide any recommendations or solutions to successfully generate a searchable PDF?Thank you for your assistance!Additional Information:API Endpoint: %DI_ENDPOINT%API Key: %DI_KEY%Request URL (Image): https://raw.githubusercontent.com/Azure-Samples/cognitive-services-REST-api-samples/master/curl/form-recognizer/rest-api/read.png Read More