pdf document stored in MSSQL 2005

Discussions about document viewing.
Post Reply
northrd
Posts: 6
Joined: Thu Aug 16, 2007 1:44 pm

pdf document stored in MSSQL 2005

Post by northrd » Fri Aug 17, 2007 3:01 am

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

northrd
Posts: 6
Joined: Thu Aug 16, 2007 1:44 pm

Post by northrd » Tue Aug 21, 2007 2:16 pm

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.

Post Reply

Who is online

Users browsing this forum: No registered users and 1 guest