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. Image for the cookie policy date

How to convert document object into html object on the fly

hi all,
I need to convert document object coming from memory stream into html object on the fly and pass it to the view for displaying in the editor.
I am using syncfusion libraries for reading and saving into database.
I used

HTMLExport h = new HTMLExport();

here for saving as html h.saveas() method is accepting two arguments,one is doc object and other is filename ,but i need to create that html object on the fly.

Please provide me any sample or examples on how to do this

Thanks & Regards

-Sahithi

 


5 Replies

MK Madhankumar K Syncfusion Team June 7, 2012 09:25 AM UTC

Hi Sahithi,
Thank you for your interest in Syncfusion products.

We have prepared the sample to meet your requirement of displaying the converting  document object into html object on the fly using DocIO.

Please do find the sample from the attachment. Try running the sample and let us know if this helps you.

Please let us know if you have any other questions.
Regards,
Madhankumar



Sample_1ad9a2e2.zip


SA sahithi June 7, 2012 09:55 AM UTC

Hi..
Thanks for the solution.In the code which you sent intitially you are trying to open a document giving the path statically.
But in my case i am retrieving the document using linq query then i am performing conversion to document object and thereby trying to save using doc.save(ms,Formattype.html)
Here ms is my memory stream object.And later i assigned to stream reader taking a varible and passed it to view
I tried this way but no luck.
Is there any other thing i can do.?
Please provide me any sample or example relating to my task
Thanks & Regards
Sahithi
 
 
 


MK Madhankumar K Syncfusion Team June 11, 2012 01:08 PM UTC

Hi Shahthi,

Could you provide your sample, so that we can identify where you have went wrong when passing the stream variable to the view.

Please let us know if you have any question.

Regards,

Madhankumar



SA sahithi June 11, 2012 01:26 PM UTC

Hi...
I was able to convert to html object and display in the editor UI.I am updating the document in editor UI and passing the edited content as an object to the controller.
Now i need to convert this object into document object for saving into DB
Could you please provide me any sample or example on how to do this
Thanks & Regards
-Sahithi


MK Madhankumar K Syncfusion Team June 13, 2012 03:08 PM UTC

Hi Sahithi,
Thank you for your update.

We have prepared the sample to meet your requirement   of saving  updated document in to database  using DocIO.

Please do find the sample from the attachment. Try running the sample and let us know if this helps you.

Please let us know if you have any other questions.
Regards,
Madhankumar



Sample_49945c2.zip

Loader.
Live Chat Icon For mobile
Up arrow icon