8

in vb.net is it possible to display a pdf file on a form?

Eric
  • 6,196
  • 1
  • 30
  • 48
Alex Gordon
  • 54,010
  • 276
  • 644
  • 1,024

3 Answers3

7

If you're looking to display a PDF without needing Acrobat Reader installed on a client machine, take a look at this:

PDF Viewer Control Without Acrobat Reader Installed

I haven't tried it yet but probably will.

Jay Riggs
  • 52,110
  • 9
  • 138
  • 148
  • 1
    +1 I like it, but I'd personally be a bit wary of having to deploy that many third-party DLLs along with my app. Not that my solution is much better. – MusiGenesis Aug 24 '09 at 20:51
  • I wouldn't assume that the client has Adobe Reader installed, nor that they have PDF viewing in the web browser enabled. What's more, if they don't, it's a hefty download. What's worse, a few third-party DLLs or one humongous dependency? Which will the user be less affected by? – Rowan Aug 26 '09 at 10:22
6

A quick hack for this would be to use a WebBrowser control (assuming the client has Adobe Reader installed) and navigate it to the PDF file you want to display.

MusiGenesis
  • 72,855
  • 39
  • 185
  • 327
  • cool suggestion, but the thing is i will need to place images on top of the pdf – Alex Gordon Aug 24 '09 at 20:46
  • Put the images in PictureBoxes, and put the PictureBoxes over the WebBrowser control. I think the WebBrowser has a Controls collection, and if it doesn't you just add the PictureBoxes to the form's Controls collection and call BringToFront on them. – MusiGenesis Aug 24 '09 at 21:04
-3

yes, but you will end up using a COM+

user155403
  • 35
  • 5