Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • World
  • Users
  • Groups
Skins
  • Light
  • Cerulean
  • Cosmo
  • Flatly
  • Journal
  • Litera
  • Lumen
  • Lux
  • Materia
  • Minty
  • Morph
  • Pulse
  • Sandstone
  • Simplex
  • Sketchy
  • Spacelab
  • United
  • Yeti
  • Zephyr
  • Dark
  • Cyborg
  • Darkly
  • Quartz
  • Slate
  • Solar
  • Superhero
  • Vapor

  • Default (No Skin)
  • No Skin
Collapse
Code Project
  1. Home
  2. General Programming
  3. Visual Basic
  4. opening a pdf with vb6

opening a pdf with vb6

Scheduled Pinned Locked Moved Visual Basic
question
8 Posts 4 Posters 0 Views 1 Watching
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • R Offline
    R Offline
    reegan41
    wrote on last edited by
    #1

    I have a button, and once clicked, want it to open (and display) a pdf document. How do I go about this? Thanks.

    D 1 Reply Last reply
    0
    • R reegan41

      I have a button, and once clicked, want it to open (and display) a pdf document. How do I go about this? Thanks.

      D Offline
      D Offline
      Dave Kreskowiak
      wrote on last edited by
      #2

      You'll need a 3rd party control to load and display the PDF. Visual Basic doesn't come with anything that can do it. Google for one here[^].

      A guide to posting questions on CodeProject[^]
      Dave Kreskowiak Microsoft MVP Visual Developer - Visual Basic
           2006, 2007

      R 1 Reply Last reply
      0
      • D Dave Kreskowiak

        You'll need a 3rd party control to load and display the PDF. Visual Basic doesn't come with anything that can do it. Google for one here[^].

        A guide to posting questions on CodeProject[^]
        Dave Kreskowiak Microsoft MVP Visual Developer - Visual Basic
             2006, 2007

        R Offline
        R Offline
        reegan41
        wrote on last edited by
        #3

        Thanks Dave. Any recommendations? (ie, have you used one ever?)

        D K 2 Replies Last reply
        0
        • R reegan41

          Thanks Dave. Any recommendations? (ie, have you used one ever?)

          D Offline
          D Offline
          Dave Kreskowiak
          wrote on last edited by
          #4

          Nope. I haven't had to do anything with PDF's.

          A guide to posting questions on CodeProject[^]
          Dave Kreskowiak Microsoft MVP Visual Developer - Visual Basic
               2006, 2007

          R 1 Reply Last reply
          0
          • R reegan41

            Thanks Dave. Any recommendations? (ie, have you used one ever?)

            K Offline
            K Offline
            Kschuler
            wrote on last edited by
            #5

            I've used a Glyph & Cog product to work with PDFs. I used the XpdfPrint, which doesn't display PDFs, just prints them, but they have some viewer controls and they were very helpful when I called for advice and questions. The price was pretty reasonable too: http://www.glyphandcog.com[^] Also, I Adobe has an SDK...I couldn't get it to do what I wanted with printing, but perhaps you would be able to use it for viewing. You should be able to just google it or search their site. The up side of this one is that it is free, the downside is that the user will have to have adobe and you will have to code for each versin of adobe. Another product I've used is the Studio Enterprise .Net toolset from Component One. They are a bit more pricey, and you have to buy the whole package even if you want just one component, but I had a lot of good help when I called with questions on this product as well: http://www.componentone.com/StudioEnterprise/NETToolset.aspx[^] Hope this helps.

            1 Reply Last reply
            0
            • D Dave Kreskowiak

              Nope. I haven't had to do anything with PDF's.

              A guide to posting questions on CodeProject[^]
              Dave Kreskowiak Microsoft MVP Visual Developer - Visual Basic
                   2006, 2007

              R Offline
              R Offline
              reegan41
              wrote on last edited by
              #6

              Actually I didn't need anything 'third party' All you have to do is: Dim acroApp As New Acrobat.Acroapp acroApp.Show Dim acroDoc As New AcroAVDoc acroDoc.Open "C:\filename.pdf", "" thanks anyway though...finding freeware controls to open pdf sure was a pain, I'm glad "this" works!

              L D 2 Replies Last reply
              0
              • R reegan41

                Actually I didn't need anything 'third party' All you have to do is: Dim acroApp As New Acrobat.Acroapp acroApp.Show Dim acroDoc As New AcroAVDoc acroDoc.Open "C:\filename.pdf", "" thanks anyway though...finding freeware controls to open pdf sure was a pain, I'm glad "this" works!

                L Offline
                L Offline
                Luc Pattyn
                wrote on last edited by
                #7

                When that works, why not simply use Process.Start(myPdfDocument) ? that works just like double-clicking myPdfDocument in Windows Explorer. The advantage is you now depend on the existence of a file association (for PDF) instead of on a particular PDF reader. :)

                Luc Pattyn


                try { [Search CP Articles] [Search CP Forums] [Forum Guidelines] [My Articles] } catch { [Google] }


                1 Reply Last reply
                0
                • R reegan41

                  Actually I didn't need anything 'third party' All you have to do is: Dim acroApp As New Acrobat.Acroapp acroApp.Show Dim acroDoc As New AcroAVDoc acroDoc.Open "C:\filename.pdf", "" thanks anyway though...finding freeware controls to open pdf sure was a pain, I'm glad "this" works!

                  D Offline
                  D Offline
                  Dave Kreskowiak
                  wrote on last edited by
                  #8

                  reegan41 wrote:

                  Actually I didn't need anything 'third party' All you have to do is:

                  Actually, this IS third party. Acrobat is not installed with Visual Basic. What you're using is the COM server that's installed with Adobe Acrobat Reader. Don't try and distribute your app to other machines without verifying that the same version of Acrobat Reader your machine has is installed on other machines that your app will run on.

                  A guide to posting questions on CodeProject[^]
                  Dave Kreskowiak Microsoft MVP Visual Developer - Visual Basic
                       2006, 2007

                  1 Reply Last reply
                  0
                  Reply
                  • Reply as topic
                  Log in to reply
                  • Oldest to Newest
                  • Newest to Oldest
                  • Most Votes


                  • Login

                  • Don't have an account? Register

                  • Login or register to search.
                  • First post
                    Last post
                  0
                  • Categories
                  • Recent
                  • Tags
                  • Popular
                  • World
                  • Users
                  • Groups