opening a pdf with vb6
-
I have a button, and once clicked, want it to open (and display) a pdf document. How do I go about this? Thanks.
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 -
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 -
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 -
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.
-
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, 2007Actually 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!
-
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!
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] }
-
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!
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