Ask a Question related to Adobe Acrobat SDK, Design and Development.
-
Maik_Schulze@adobeforums.com #1
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
-
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... -
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... -
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... -
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... -
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... -
Leonard_Rosenthol@adobeforums.com #2
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
-
Maik_Schulze@adobeforums.com #3
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



Reply With Quote

