Convert a Word DOCX Stream to PDF Memory Stream using C# .NET

i want to convert word(Docx) to pdf using memory stream.can u help me

@N497655,

The following C# code of Aspose.Words for .NET API will convert a DOCX stream to PDF memory stream:

Stream stream = File.OpenRead("C:\\Temp\\word.docx");
// Load the entire document into memory.
Document doc = new Document(stream);
// You can close the stream now, it is no longer needed because the document is in memory.
stream.Close();

// Convert the document to PDF format and save to stream.
MemoryStream dstStream = new MemoryStream();
doc.Save(dstStream, SaveFormat.Pdf);

// Rewind the stream position back to zero so it is ready for the next reader.
dstStream.Position = 0;

Please also check: