I found several older questions on if and how to do OCR by using Cognitive Services. On Cognitive services I can find a step-by-step description which tells me that and how OCR from PDF can be done. When I do it like the example memntioned at the bottom of the page, I still get that unsuppertdMediaType result
{ "code": "UnsupportedMediaType", "requestId": "c427e1c7-3f99-4a74-a36f-1620e68e3b64", "message": "Supported media types: application/octet-stream, multipart/form-data or application/json" }
When I change the PDF to an image everything is fine. I currently follow cognitive-services but while the request seems to be fine, the document type still is unsupported. I call:
https://.cognitiveservices.azure.com/vision/v2.0/ocr?language=de&detectOrientation=true&Ocp-Apim-Subscription-Key=&Content-Type=application/octet-stream
and the file is contained in the body, of course.
I don't post the C# or PowerShell, as the problem indeed seems to be with my request from the URL mentioned above.
Can someone please help me understand how to get a valid request to get text from a PDF with Azure ComputerVision?