Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Mike Lewis on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Read and Write PDF file in sql server using BLOB

Status
Not open for further replies.

3DDD

Programmer
Oct 15, 2003
30
0
0
US
Hi All

I have successfully uoloaded pdf file in sql server database using DATABLOB.

Does anyone know how to read back pdf file in picture box??

The following code gives an error while reading pdf file: Invalid parameter used but works fine for reading jpg, tif, gif.

Dim b() As Byte = CType(da.Item(0), Byte())
PictureBox1.Image = Image.FromStream(New MemoryStream(b))

Thanks
 
a pdf file is no image file so you can't show it in a picturebox.

Christiaan Baes
Belgium

If you want to get an answer read this FAQ faq796-2540
There's no such thing as a winnable war - Sting
 
is there any other way to display pdf file saved in binary format??

Any other ideas?
 
Open it in a web browser. Launch Adobe Acrobat Reader. Search google for a 3rd party .PDF display control. Use ghost script to print it to an image then display the image...

Lots of options.

-Rick

VB.Net Forum forum796 forum855 ASP.NET Forum
[monkey]I believe in killer coding ninja monkeys.[monkey]
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top