We use cookies to give you the best experience on our website. If you continue to browse, then you agree to our privacy policy and cookie policy. (Last updated on: November 16, 2018).
Unfortunately, activation email could not send to your email. Please try again.
Syncfusion Feedback

Is there any methods to convert the memory stream object in to Html format

Thread ID:





103945 Jun 11,2012 12:45 PM UTC Jun 13,2012 11:41 AM UTC ASP.NET MVC (Classic) 1
Tags: PDF
Arjun Gudla
Asked On June 11, 2012 12:45 PM UTC


I have an browse button whenever i am selecting a pdf file it has to be read and copied in to database
it is working fine and from the database i want to convert the pdf object in to html format and i want 
to display it in a editor.The thing is i am display the content but it is not html but it is like some converted language and not human understandable.

Please anybody tell me how to convert it in to html format.i have used memory stream and stream reader methods.I am sending my display function code

public ActionResult Display()
            { var query = (from i in dbContext.Pdffiles
                             where i.Id == 1
                             select new { Name = i.File }).FirstOrDefault();

                byte[] buffer = (byte[])query.Name;
System.IO.MemoryStream ms = new System.IO.MemoryStream(buffer);
 PdfLoadedDocument ldDoc = new PdfLoadedDocument(ms);
MemoryStream m = new MemoryStream();
                m.Seek(0, SeekOrigin.Begin);
                StreamReader sr = new StreamReader(m,?);//i think i need to write some additional functionality.please tell me any body having any idea 
                var s = sr.ReadToEnd();

                return Json(s, JsonRequestBehavior.AllowGet);

            catch (NotSupportedException) { return Json(new { st = "exception" }); }

Thanks and Regards

Geetha M [Syncfusion]
Replied On June 13, 2012 11:41 AM UTC

Hi Srinivas,

Thank you for your interest in Syncfusion products.

PDF saved as memory stream will be in PDF format. Hence it is not possible to read them as text. The PDF need to be converted to HTML format. Currently we do not have support for PDF to HTML conversion.

Please let me know if you have any questions.



This post will be permanently deleted. Are you sure you want to continue?

Sorry, An error occured while processing your request. Please try again later.

Please sign in to access our forum

or the page will be automatically redirected to sign-in page in 10 seconds.

Warning Icon You are using an outdated version of Internet Explorer that may not display all features of this and other websites. Upgrade to Internet Explorer 8 or newer for a better experience.Close Icon