I am working on an azure function in which I need to convert PDF to Excel. I am using Adobe PDF Tools API for the conversion. The PDF is in my azure storage account I access it using datalake file client and read the content in memory stream. Then I use the API and the code is shown in the picture.
Now, when I run this , I get the following error:
"Error response received for the request: An error occurred while sending the request. The response ended prematurely."
The code is in C#.
Can someone please help? Thank you in advance
I'm not familiar with C# so I'm just guessing here but I think you can remove GetMediaType() from the line starting with FileRef.
But according to the documentation, the CreateFromStream method does not work without the GetMediaType() parameter.
In this sample usage, it doesn't seem to be required... a media type is required but is defined by
input = PDFToolsSdk.FileRef.createFromLocalFile('test/resources/PDF.pdf', ExportPDF.SupportedSourceFormat.pdf);