Hello,
I'm injecting a JavaScript code to a PDF file with LCES 2 product, the script contains :
hostContainer.postMessage(["OK"]);
but unded IE8 the message is not catch the first time, it's catch only the second time and after or when I reload the page.
I have a html div; named pdfDiv; in which I injecting this script :
document.getElementById("pdfDiv").innerHTML = " ";
pdfObject = document.getElementById("pdfObject");
pdfObject.messageHandler = {
onMessage : function(aMessage) {
alert(aMessage);
},
onError : function(error, aMessage) {
alert(aMessage);
}
};
Under chrome it is always catch and under Opera the message is never catch.
Am I proceeding correctly ? Does someone knows this problems ?
I've got an example that uses a timeout here:
http://www.windjack.com/WindJack/Browser2PDF/brwsr2acroJS.htm
Thom Parker
The source for PDF Scripting Info
www.pdfscripting.com
Very Important - How to Debug Your Script