- Home
- Forum
- ASP.NET MVC (Classic)
- How to display the saved pdf content in the database.
How to display the saved pdf content in the database.
Hi,
I am using syncfusion pdf to save the pdf file in to the database. I am saving it to the database. Now i want to display the saved content in the editor. But it is displaying in unreadable format. How can i display the content in correct from the database and i need to update the pdf file and again i want to display that.
Regards,
Srinivas
SIGN IN To post a reply.
3 Replies
GL
George Livingston
Syncfusion Team
January 24, 2013 03:57 AM UTC
Hi Srinivas,
Thank you for using Syncfusion products.
Can you please provide us the information about the tool you
are using to display the PDF document. This would be more helpful for us to
further investigate on this. Also provide us the code you are using to create
and save the PDF document in the database.
Please let us know if you have any concerns.
Thanks,
George
AG
Arjun Gudla
January 25, 2013 04:26 AM UTC
byte[] buffer = (byte[])data.Name; () // where data.name contains bytes from database
PdfLoadedDocument document = new PdfLoadedDocument(ms);
string d = "";
PdfDocument c = new PdfDocument();
foreach (PdfLoadedPage page in document.Pages)
{
// document.Save(
// d += page.ExtractText(); // this is for extracting only the text from the pdf document but i am not using this. I want to load the full pdf document
}
MemoryStream m = new MemoryStream();
document.Save(m);
m.Seek(0, SeekOrigin.Begin);
StreamReader sr = new StreamReader(m, System.Text.Encoding.UTF8);
var s = sr.ReadToEnd();
pr.text = s;
sr.Close();
I am inserting the content in to the textarea or editor. Actually if we have only content in the pdf document it is coming clearly. But, if we have tables or other content other than text it is displaying in some other format like unreadable. Is there any other method to display the content form the database such that tables, images and text will display. Or is there any methods to convert pdf to word.
Hope you understand my question.
Regards,
Srinivas
GL
George Livingston
Syncfusion Team
January 28, 2013 12:52 PM UTC
Hi Srinivas,
Thank you for your update.
We do not have support to extract formatted text from the
PDF document. But it is possible to export the PDF as images and render it to
the image control.
Please find documentation to Export PDF as image in the
below link,
Please let us know if you have any questions.
Regards,
SIGN IN To post a reply.
- 3 Replies
- 2 Participants
-
AG Arjun Gudla
- Jan 23, 2013 06:33 AM UTC
- Jan 28, 2013 12:52 PM UTC