Aspose.Pdf.Examples.CSharp.AsposePDF.DocumentConversion.PDFToHTMLFormat.OutPutToStream.SavingToStream C# (CSharp) Method

SavingToStream() private static method

private static SavingToStream ( HtmlSaveOptions htmlSavingInfo ) : void
htmlSavingInfo HtmlSaveOptions
return void
        private static void SavingToStream(HtmlSaveOptions.HtmlPageMarkupSavingInfo htmlSavingInfo)
        {
            byte[] resultHtmlAsBytes = new byte[htmlSavingInfo.ContentStream.Length];
            htmlSavingInfo.ContentStream.Read(resultHtmlAsBytes, 0, resultHtmlAsBytes.Length);
            // Here You can use any writable stream, file stream is taken just as example
            string fileName = "stream_out.html";
            Stream outStream = File.OpenWrite(fileName);
            outStream.Write(resultHtmlAsBytes, 0, resultHtmlAsBytes.Length);
        }
        // ExEnd:SavingToStream