JavaScript Problem with Embedded Reader

Ask a Question related to Adobe Acrobat SDK, Design and Development.

  1. #1

    Default JavaScript Problem with Embedded Reader

    Hello,

    I've been working on a Browser-based application that lets an embedded Reader (through document JS code) communicate with Flex objects.

    This works perfectly as long as I do not load another PDF file. This is how I do it. The Embedded Reader is placed on the HTML site like this:

    object id="PDFObj"
    NAME="PDFObj"
    data="3dobject1.pdf"
    type="application/pdf"
    width="100%"
    height="100%"/

    After some time, I would like to load another PDF into the Embedded Reader like this (called upon a button click):

    var pdf = document.getElementById("PDFObj");
    pdf.data = "3dobject2.pdf";

    Unfortunately, JavaScript will not work properly anymore after loading another file. Most of the time, the PDF receives messages from outside and reacts accordingly, but the other direction will not work. The PDF cannot send messages to the HTML site it is embedded in (and therefore not Flex). Sometimes, neither way works.

    Does someone have experience with that? Is it because, I implicitly load a new file by setting the data property? Is there a more elegant way to explicitly load a new file into an Embedded Reader? Could this be an issue of the Browser's JavaScript engine? Or a bug in the Embedded Reader? Or is there a JS function that will allow the Browser to properly update the embedded objects? I'm quite out of ideas.

    My configuration:
    Firefox 3, Windows XP 32 Bit, Acrobat Reader 9.0
    Website objects:
    PDFs include embedded document JS code and 3D annotations
    Flex 3.0

    Regards
    Maik
    Maik_Schulze@adobeforums.com Guest

  2. Similar Questions and Discussions

    1. JavaScript actions in Acrobat Reader
      Hi, Is it possible to create a bookmark with a form button and a javascript action in Acrobat Reader? Is it possible to create a report with a form...
    2. Talking to Internet Explorer embedded Acrobat Reader via COM
      Hi all. I'm developing an Internet Explorer BHO (browser plugin) and was wondering whether it's possibly for me to communicate with Acrobat Reader...
    3. Embedded Font Problem, HELP!
      Hello All, I am trying to make a movie in Director and embed a font so that when I put the published Shockwave file on the internet, viewers will...
    4. Problem playing Quicktime thru .DCR embedded in HTML - pathreferencing problem?
      Greetings earthlings and Director heads. Here's the problem: created an HTML file containing shockwave (dcr) movie that calls quicktime movies in...
    5. Embedded Javascript (XML/XSL) error on call to makeMenu
      Hello Everyone: Perhaps someone out there can help with this. I am getting the following error when running a CGI (Perl) script that generates...
  3. #2

    Default Re: JavaScript Problem with Embedded Reader

    What you are doing has NOTHING to with Reader - you are working entirely with the browser...
    Leonard_Rosenthol@adobeforums.com Guest

  4. #3

    Default Re: JavaScript Problem with Embedded Reader

    Hello,

    I've not been taking into account that it is not sufficient to change the src attribute. Of course, that will load another PDF. Yet it will also mess up the existing registered msgHandlerObject (inside the HTML). Obviously, it has to be re-initialized. The JS communication will then work again.

    I'm sorry for taking your time and being too blind to realize that right away.

    Regards
    Maik
    Maik_Schulze@adobeforums.com Guest

Posting Permissions

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

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139