Hello and welcome to our community! Is this your first visit?
Register
Enjoy an ad free experience by logging in. Not a member yet? Register.
Results 1 to 4 of 4
  1. #1
    New to the CF scene
    Join Date
    May 2008
    Posts
    2
    Thanks
    0
    Thanked 0 Times in 0 Posts

    javascript and PDF document

    I have a small iframe, which loads a PDF document, in my webpage.


    My question is...
    Is it possible to write javascript that controls the PDF in the iframe?
    For example, I need it to search something in the PDF and select the first word found.



    Is it possible?

  • #2
    Regular Coder mjlorbet's Avatar
    Join Date
    Jan 2008
    Location
    Milwaukee, WI
    Posts
    724
    Thanks
    8
    Thanked 96 Times in 95 Posts
    you would need to create an activex object to load the pdf document instead of relying on the browser's behavior to load the pdf in your page. then you could (based on the documentation of the activex object you can create from the adobe dlls/ocxs) use scripting to invoke functions on the object.
    -Mike
    "Want me to precludify him, like some kind of dispatcherator?... Can do!" -Bender

  • #3
    New to the CF scene
    Join Date
    May 2008
    Posts
    2
    Thanks
    0
    Thanked 0 Times in 0 Posts
    Are there freely availble PDF viewer activeX controls?





    Does Adobe provide one?

  • #4
    Regular Coder mjlorbet's Avatar
    Join Date
    Jan 2008
    Location
    Milwaukee, WI
    Posts
    724
    Thanks
    8
    Thanked 96 Times in 95 Posts
    adobe acrobat is running in an activex instance when appearing in the browser. all you need to do is either use reflector to find out what methods and structures it has (or find some other documentation on it) and figure out the name to instantiate it with. keep in mind that even if you do get this script running, only ie supports the creation of activex controls in script (as such) and only in windows at that. might be better to give up the extra functionality and go with cross platform.
    -Mike
    "Want me to precludify him, like some kind of dispatcherator?... Can do!" -Bender


  •  

    Posting Permissions

    • You may not post new threads
    • You may not post replies
    • You may not post attachments
    • You may not edit your posts
    •