We're sorry Aspose doesn't work properply without JavaScript enabled.

Free Support Forum - aspose.com

Convert Word document to PDF stream using ASP.NET


I have a requirement to Convert an uploaded document file into PDF in a web application;
Assuming the inputStream is DOCX file stream; I am doing the following to convert; looks like when I save this output stream, the PDF file is 0 bytes. We have Aspose.Total license for 1.6.2 version; I tried downloading the latest version of Aspose.Total - looks like it is the same behavior.

Aspose.Words.License license = new Aspose.Words.License();
Aspose.Words.Document doc = new Aspose.Words.Document(inputStream);
doc.Save(output, Aspose.Words.SaveFormat.Pdf);

Thanks for any help.


Hi Sivakumar,

Thanks for your query. I have tested the same scenario but unable to reproduce the same problem at my end. It would be great, If you share your document for investigation purposes.

All I have is a one page DOCX file, first read into a Stream Object, and I am trying to save it into another Stream object with SaveFormat as PDF; now take this output stream and save it into a physical PDF file which is not writing and comes as 0 bytes.


Thanks for your inquiry.
Please also share your mechanism. How are you saving your output stream as physical Pdf file. As per Tahir’s description, please also share sample document to reproduce this issue at my end.