How do I retreive a PDF document that is stored as an image in MSSQL 2005?
I can, of course, easily display the document before I save it to my table. Getting back into the viewer is the problem.
Cheers
Ciaran
pdf document stored in MSSQL 2005
To add to the previous post I save images to a table (increased security on a server). BMP,JPEG and TIFF all come back OK. PDF gets horribly confused.
I have tried the save to file method as follows
If DocType = 2 Then
.Write ClientDocuments.Recordset!Document
.SaveToFile "c:\temp.pdf", adSaveCreateOverWrite
SmallImage(IItem).DisplayFromPdfFile "c:\temp.pdf"
Else
.Write ClientDocuments.Recordset.Fields("document").Value
SmallImage(IItem).DisplayFromStream RSStream
End If
But I get an error telling me that the viewer cannot load the file. Moreover, if I try to view the image in acrobat reader 8 it tells me that file is NOT a PDF.
I have tried the save to file method as follows
If DocType = 2 Then
.Write ClientDocuments.Recordset!Document
.SaveToFile "c:\temp.pdf", adSaveCreateOverWrite
SmallImage(IItem).DisplayFromPdfFile "c:\temp.pdf"
Else
.Write ClientDocuments.Recordset.Fields("document").Value
SmallImage(IItem).DisplayFromStream RSStream
End If
But I get an error telling me that the viewer cannot load the file. Moreover, if I try to view the image in acrobat reader 8 it tells me that file is NOT a PDF.
Who is online
Users browsing this forum: No registered users and 1 guest