Okay,
I have a SQL 2005 database with a stored PDF. The column uses the image type. So when the PDF gets stores it is a byte[] array.
So here is the hard part. I can get it to store the data but I am not sure how to go about getting the byte[] array back into PDF format and display it on the web page.
I am using a 3rd part tool to generate the PDF, which works great.
The code I have to generate the byte[] array is as follows:
Doc document = new Doc();
byte[] myArray = document.GetData();
I then insert the byte[] array into the database.
When I get the array back from the database I do this:
public byte[] GetPDF(parameters)
{
return DAL.GetPDF(parameters)
}
This returns a valid byte[] array as it is supposed to.
Now, the only issue is actually writing the PDF to the web site and having it display on the web site, I am not sure how to do this or where to even begin.