none
PDF Viewer Control RRS feed

  • Question

  • I know this is not an Access issue per se but I need an activex control to view, rotate, zoom pdf documents inside an Access form. It has never been easy working with anything adobe

    Thanks


    50% of programming is coding. The other 90% is debugging

    Wednesday, September 30, 2015 10:03 PM

Answers

  • Hi,

    I used Microsoft Web Browser Control.

    Simple code to load document:

    Me.WebBrowserControlName.navigate (CStr(path))

    you havet to install adobe reader or foxit reader on client computer.


    Michał

    Thursday, October 1, 2015 7:05 AM
  • Hi JonWayn,

    >>However, I'd like to add some functionality like scrolling, zooming, and rotating. I can click on the wb control and do Ctrl+Shft++ but how can I do that programmatically?

    I agree with Michal, and suggest you use Web Browser Control. With adobe reader installed, you would see scrolling, zooming buttons, for rotating buttons, I think you could suggest you end user do by right click the pdf file in web browser.

    If you want to use buttons, I suggest you use SendKeys.

    A simple code like below:

    Private Sub Command6_Click()
    Me.WebBrowser5.SetFocus ‘set web browser focus
    SendKeys "^+({+})" ‘ctrl+shift+”+”
    End Sub

    Best Regards,

    Edward


    We are trying to better understand customer views on social support experience, so your participation in this interview project would be greatly appreciated if you have time. Thanks for helping make community forums a great place.
    Click HERE to participate the survey.


    Monday, October 5, 2015 7:43 AM

All replies

  • You can use an OLE Unbound Control, but really, what is the benefit versus just launching the PDF on its own using the Shell function?


    -Tom. Microsoft Access MVP

    Thursday, October 1, 2015 4:22 AM
  • Hi,

    I used Microsoft Web Browser Control.

    Simple code to load document:

    Me.WebBrowserControlName.navigate (CStr(path))

    you havet to install adobe reader or foxit reader on client computer.


    Michał

    Thursday, October 1, 2015 7:05 AM
  • That's a darn good question now that I think about it

    50% of programming is coding. The other 90% is debugging

    Thursday, October 1, 2015 11:06 AM
  • I tried that but then the pages had to be rotated and the rotate buttons weren't present

    50% of programming is coding. The other 90% is debugging

    Thursday, October 1, 2015 11:07 AM
  • Use short key: [shift]+[ctr]+[+] or [shift]+[ctr]+[-] 

    Michał

    Thursday, October 1, 2015 11:09 AM
  • The WebBrowser idea is looking better the more I look into it. However, I'd like to add some functionality like scrolling, zooming, and rotating. I can click on the wb control and do Ctrl+Shft++ but how can I do that programmatically? How do I get the user to use buttons I provide rather than having to manually click on the web browser control? Also, WB.object.Document.parentWindow raises an error - object doesn't support this prop or method. Id like to be able to give the user the ability to scroll a few notches, or a screen up or down.

    Thanks again


    50% of programming is coding. The other 90% is debugging

    Saturday, October 3, 2015 3:02 AM
  • Well I guess there it is not a Document as in an HTMLDocument so all the props and meths don't apply. However, it there a way to send key-strokes to the object in the browser regardless what it is. By the way, the object in this case has a window handle or something like an hWnd property. Can this be used in any of the mentioned regards?

    50% of programming is coding. The other 90% is debugging

    Saturday, October 3, 2015 5:41 AM
  • Hi JonWayn,

    >>However, I'd like to add some functionality like scrolling, zooming, and rotating. I can click on the wb control and do Ctrl+Shft++ but how can I do that programmatically?

    I agree with Michal, and suggest you use Web Browser Control. With adobe reader installed, you would see scrolling, zooming buttons, for rotating buttons, I think you could suggest you end user do by right click the pdf file in web browser.

    If you want to use buttons, I suggest you use SendKeys.

    A simple code like below:

    Private Sub Command6_Click()
    Me.WebBrowser5.SetFocus ‘set web browser focus
    SendKeys "^+({+})" ‘ctrl+shift+”+”
    End Sub

    Best Regards,

    Edward


    We are trying to better understand customer views on social support experience, so your participation in this interview project would be greatly appreciated if you have time. Thanks for helping make community forums a great place.
    Click HERE to participate the survey.


    Monday, October 5, 2015 7:43 AM
  • That idea works great Edward. Only issue is that the code of zoom out rotates instead of zooms. Funny enough, zoom in, which will probably never be needed, works. SendKeys ^{-} works

    SendKeys ^{+} does not

    But it does a great jub with page down and rotate


    50% of programming is coding. The other 90% is debugging

    Monday, October 5, 2015 10:18 AM
  • Are you looking for a web PDF viewer control? If yes, you can try

    https://webpdfviewer.codeplex.com/

     
    Tuesday, November 3, 2015 7:07 AM