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 it possible to convert the memory stream in to pdf or doc or image format

Thread ID:

Created:

Updated:

Platform:

Replies:

104376 Jul 14,2012 08:06 AM UTC Jul 26,2012 10:54 AM UTC ASP.NET MVC (Classic) 8
loading
Tags: PDF
Arjun Gudla
Asked On July 14, 2012 08:06 AM UTC

Hi,

In my database i am saving the files in memory stream format.But i want to display the memory stream 
in another format.Is it possible to convert the memory stream to another format like pdf or image or doc
based on the requirement of user.
The thing is i want to convert the saved memory stream in to required format of the user it may be pdf or doc 
or image.If possible please provide me a sample code

Thank You


Kesavan D [Syncfusion]
Replied On July 17, 2012 09:29 AM UTC

Hi Srinivas,

Thank you for using Syncfusion products.

We request you to provide the original format of file in memory stream stored in the database. It would be helpful for us provide an appropriate solution.

Please let us know if you have any questions.

Regards,

Kesavan


Arjun Gudla
Replied On July 17, 2012 09:56 AM UTC

Hi,

I am using three different files for saving in to database 
the three files are pdf,doc and text files


Thank You

Arjun Gudla
Replied On July 18, 2012 05:53 AM UTC

Hi,

I am using only word format to save to database
Please provide me sample regarding the word format


Thanks and Regards,
Srinivas

Kesavan D [Syncfusion]
Replied On July 18, 2012 10:13 AM UTC

Hi Srinivas,

Thank you for using Syncfusion products.

We have created a sample for retrieving the memory stream from the database and convert it to PDF document , Word Document or Image. We have attached the sample in this post.

Please verify the sample let us know if this helps.

Regards,

Kesavan



Sample 104376_985a9421.zip

Arjun Gudla
Replied On July 18, 2012 10:39 AM UTC

Hi kesavan,

Thanks for the Fast Reply,
It was useful but i don't want to save the file to the local drive i want to open the file in the browser 
and i want to display the content of the file to be placed in an editor.
I have tried for the browser like

                Response.ContentType = "application/pdf";
                Response.AddHeader("content-disposition", "inline;filename=d:/doctopdf.pdf");
                Response.AddHeader("content-length", ms.Length.ToString());
                Response.BinaryWrite(ms.ToArray());
                Response.End();
But it is not working 
And i also want to display the content in to an editor based on the user requirement for 
the browser or for the editor, Is it possible 
Please provide me a sample 


Thanks and Regards
Srinivas


Kesavan D [Syncfusion]
Replied On July 20, 2012 09:29 AM UTC

Hi Srinivas,

 

Thank you for using Syncfusion products.

We have created a sample for retrieving the memory stream from the database and convert it to PDF document , Word Document or Image and display it using browser. We have attached the sample in this post.

We are not clear about the term editor could you please provide a detailed information on it. So we could guide you in the same.

Please verify the sample let us know if this helps.


Regards,

Kesavan



Sample 104376_bd32e1c1.zip

Arjun Gudla
Replied On July 20, 2012 10:26 AM UTC

Hi,

I don't want to save the files to the local directory.After converting it to pdf format i want to display the 
format in a textarea which is present in the view 
Here in your code you are saving the file to local directory but i don't want to do that.
Hope you understand my question now


Thanks and Regards
Srinivas


Kesavan D [Syncfusion]
Replied On July 26, 2012 10:54 AM UTC

Hi Srinivas,

 

Thank you for using Syncfusion products.

 

“pdfDoc.Save("DoctoPDF.pdf", Response, HttpReadType.Open);”   

 

The above statement does not save the file to the local directory, it opens the generated document using the browser plugin.

 

Please let us know if you have any  questions.

 

Regards,

Kesavan


CONFIRMATION

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.

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

;