I have converted the pdf in to bytes ands stored in database.
Below is the source code
pdf.SaveToFile(strPDFFormatFileName, FileFormat.PDF);
// Writing in to bytes to store in database
byte[] fileContentsPDF = null;
using (MemoryStream stream = new MemoryStream())
{
pdf.SaveToStream(stream, Spire.Pdf.FileFormat.PDF);
fileContentsPDF = stream.ToArray();
}
Wheni try to retrieve it and open the pdf it is coming as plain pdf document.
Below is the source code
byte[] op = { data will be fetched from database and assigned to this variable)
pdf.LoadFromBytes(op);
pdf.SaveToFile(strPDFFormatFileName, FileFormat.PDF);
Please advice