We use ‘asposewordscloud’ in node JS to convert docx files to pdf. It seems that certain files from certain clients do not convert to PDF at all and result in a 500 status code when we use convertDocument(convertRequest).
I’ve downloaded the problematic file and sent a request from my PC but it fails every time, when I “Save as” the file, it seems the work, as if it was a localization issue or something but from what I can tell, the word file is in English.
This is only part of the response body but hopefully this is enough:
"body":{"requestId":"3016d81d0d98fe933076ba1d56d3837c","error":{"message":"Object reference not set to an instance of an object."}
If not, this is the rest of the response excluding the above and a bearer token:
{"response":{"statusCode":500,"body":{"type":"Buffer","data":[123,13,10,32,32,34,69,114,114,111,114,34,58,32,123,13,10,32,32,32,32,34,77,101,115,115,97,103,101,34,58,32,34,79,98,106,101,99,116,32,114,101,102,101,114,101,110,99,101,32,110,111,116,32,115,101,116,32,116,111,32,97,110,32,105,110,115,116,97,110,99,101,32,111,102,32,97,110,32,111,98,106,101,99,116,46,34,13,10,32,32,125,44,13,10,32,32,34,82,101,113,117,101,115,116,73,100,34,58,32,34,51,48,49,54,100,56,49,100,48,100,57,56,102,101,57,51,51,48,55,54,98,97,49,100,53,54,100,51,56,51,55,99,34,13,10,125]},"headers":{"date":"Tue, 25 Jun 2024 00:32:29 GMT","content-type":"application/json; charset=utf-8","content-length":"147","connection":"close"},"request":{"uri":{"protocol":"https:","slashes":true,"auth":null,"host":"api.aspose.cloud","port":null,"hostname":"api.aspose.cloud","hash":null,"search":"?format=pdf","query":"format=pdf","pathname":"/v4.0/words/convert","path":"/v4.0/words/convert?format=pdf","href":"https://api.aspose.cloud/v4.0/words/convert?format=pdf"},"method":"PUT","headers":{"Content-Type":"application/octet-stream","x-aspose-client":"nodejs sdk","x-aspose-client-version":"24.6"
I can’t post the original document here since it contains sensitive info and this is a public forum, I hope that the request ID can let you track it somehow and pinpoint the issue.
The original title of this post is accurate because in our node JS server, this file would sometimes render and sometimes not but it 100% doesn’t render locally.