|
-
Oct 12th, 2012, 01:23 AM
#1
Thread Starter
Hyperactive Member
Store and display .PDF file
Hi,
How to store .pdf in sql server 2008 in varbinary\image field using vb.net and again display in form.
Thanks
Sunil
-
Oct 12th, 2012, 01:44 AM
#2
Re: Store and display .PDF file
Please mark you thread resolved using the Thread Tools as shown
-
Oct 12th, 2012, 02:02 AM
#3
Re: Store and display .PDF file
That link looks aimed at web apps so, if you're using a Windows app, it's worth noting that you can read a file (any file) into a Byte array by calling File.ReadAllBytes. The File.WriteAllBytes method will do the opposite.
To display a PDF file in your form, assuming that the user has Adobe Reader installed, you can put an Adobe Reader ActiveX control or even just a WebBrowser control on your form. To display it in the default application, which may be Adobe Reader or something else, e.g. the PDF viewer built into Windows 8, call Process.Start and pass the file path. All those options require a file, so you must save the data as a file, which you might do in the user's choice of location or the system Temp folder.
-
Oct 12th, 2012, 06:32 AM
#4
Thread Starter
Hyperactive Member
Re: Store and display .PDF file
Actually I want this in windows application.
Thanks
ASM
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|