Results 1 to 4 of 4

Thread: Store and display .PDF file

  1. #1

    Thread Starter
    Hyperactive Member
    Join Date
    Sep 2004
    Location
    Kolkata, India
    Posts
    290

    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

  2. #2
    Learning .Net danasegarane's Avatar
    Join Date
    Aug 2004
    Location
    VBForums
    Posts
    5,853

    Re: Store and display .PDF file

    Hope this helps
    Please mark you thread resolved using the Thread Tools as shown

  3. #3
    Super Moderator jmcilhinney's Avatar
    Join Date
    May 2005
    Location
    Sydney, Australia
    Posts
    110,344

    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.

  4. #4

    Thread Starter
    Hyperactive Member
    Join Date
    Sep 2004
    Location
    Kolkata, India
    Posts
    290

    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
  •  



Click Here to Expand Forum to Full Width