Thank you for your interest in Syncfusion products.
When the code “DocxExporting.ConvertToDocument(wordDoc.Document, stream, "." + extension);” gets executed, the file pointer is moved to the end of file location. So while trying to read the stream data it starts reading from end of file location. So only you are unable to read the stream and get the value 0.
To overcome this problem just set stream position to 0 using the code, “stream.Position = 0”. Here is the modified code snippet.
while (numBytesToRead > 0)
stream.Position = 0;
// Read may return anything from 0 to numBytesToRead.
int n = stream.Read(App.FilesToUpload.File, numBytesRead, numBytesToRead);
//Your remaining code
For your reference, we have prepared a sample to illustrate the same. Please find the attached sample and let us know if this helps you.
Please let us know if you need any further assistance.