0 Replies Latest reply on Dec 4, 2008 5:09 AM by EADSIW

    Embedding Adobe Reader

    EADSIW
      Hello,
      since I am totally unexperienced with Flex and web programming at all, I'd like to ask you guys a couple of questions. My goal is to have a Flex application embedding the Adobe Reader and being able to communicate between both applications via JavaScript. So: Flex <-----> Adobe Reader

      From what I've read here, there is no other way of embedding the Adobe Reader than the IFrame?!

      Currently, I'm using the implementation of Alistair Rutherford, www.netthreads.co.uk from September 08. Unfortunately, this additional wrapper ( Flex <-----> IFrame <------> Adobe Reader) entails a couple of problems / buggy behavior.

      The IFrame and the Adobe Reader can communicate bidirectionally without any problems.
      So this works:
      IFrame <-----> Adobe Reader

      Moreover, under certain circumstances, I can send data from Flex to the IFrame.
      So this partially works:
      Flex -----> IFrame
      Why does it only partially work? Well, once I interact with the JS controls inside the Adobe Reader this way will stop working. Only IFrame <----> Adobe Reader will work. Does anybody have an idea why? Is there something such as Scope? Could this be messed up by the IFrame approach?

      Furthermore, I wonder how I can send data from the IFrame to Flex? I read something such as document[appName].myFlexFunction() should work. Unfortunately it doesnt. I get the error message that my document[appName] is undefined.

      Do you have any suggestions on how to resolve the problems? Potentially without the IFrame at all?
      Is it possible to the following inside the application.mxml
      <local:IFrame id="myframe" label="pdf" source="my.pdf"></local:IFrame>
      and then call the JS functions inside the PDF directly and vice versa?

      Kind regards,
      Maik