Hi,
I have got a way bit further, but just stuck on try to convert documents. I have successfully managed to set a request via Python to my hosted system, which sends back data conversion formats for xlsx.
However, I am now stuck at a point where I am sending a request to perform a conversion of a document to pdf, just a simple 1 page with the words ‘testing’, however the response I get back, says that I am not specifying the output format, however I have specified the output format, as in the Python code below:
convert_request_data = {“storageName”: “data”,
“filePath”: “Testing.xlsx”,
“format”: “pdf”,
“loadOptions”: {},
“convertOptions”: {
“fromPage”: 0,
“pagesCount”: 0,
“pages”: [1]},
“outputPath”: “Testing.pdf” }
convert_request_data_json = json.dumps(json.dumps(convert_request_data))
groupdocs_convert_reponse = requests.put(convert_request_url, headers=convert_request_headers, data=convert_request_data_json)
The message I get back is as follows:
b’{“error”:{“code”:“errorInvalidInputData”,“message”:“Conversion format is not specified”,“description”:“Operation Failed. The input data is not valid.”,“innerError”:{“requestId”:“afb9583e-5c36-40bd-81c8-0cee630bab83”,“date”:“2022-03-06T08:55:32.9907476Z”}}}’
The request body consists of:
“{“storageName”: “data”, “filePath”: “Testing.xlsx”, “format”: “pdf”, “loadOptions”: {}, “convertOptions”: {“fromPage”: 0, “pagesCount”: 0, “pages”: [1]}, “outputPath”: “Testing.pdf”}”
Any guidance much appreciated.
I shall contact the sales team for a license code.