8

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

Eric
  • 6,364
  • 1
  • 32
  • 49
Alex Gordon
  • 57,446
  • 287
  • 670
  • 1,062

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
  • 53,046
  • 9
  • 139
  • 151
  • 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
  • 74,184
  • 40
  • 190
  • 334
  • 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