Hello,
I am saving user uploaded PDF files in SQL server using varbinary datatype. There is totally no problem in saving in binary and retrieving in PDF. But due to one specific requirement (which i cant change) i to need to fetch binary PDF and display in HTML or atleast get in string form.
Is it possible? If yes how.
Rite now i m opening PDF files like code written below. But it opens a PDF reader in browser. I want to display the data of PDF in plain text instead in PDF reader.
bytedata = (byte[])dsPrograms.Tables[0].Rows[0]["PDFFile"];
PdfReader pdfReader = new PdfReader(bytedata);
Response.ContentType = "application/pdf";
PdfStamper pdfStamper = new PdfStamper(pdfReader, Response.OutputStream, '\0', true);
AcroFields pdfFormFields = pdfStamper.AcroFields;
AcroFields docFields = pdfStamper.AcroFields;
...
Go to the complete details ...