Convert PDF and save result on memory in .NET

kindly i need to use groupdocs conversion to convert document to PDF and save the result on the memory stream not into path.


This Topic is created by atirtahir3 using Email to Topic tool.

@CATEC

We are investigating this scenario. Your investigation ticket ID is CONVERSIONNET-4101. As there’s any udpate, you’ll be notified.

@CATEC

Let us know if following code works for you:

var source = "sample.docx";

using (var resultStream = new MemoryStream())
{
    using (var converter = new Converter(source))
    {
        var options = new PdfConvertOptions();
        converter.Convert(() => new MemoryStream(), convertedStream => convertedStream.CopyTo(resultStream), options);
    }
}