Skip navigation
valeri_dzia
Currently Being Moderated

communication html-pdf

Jul 17, 2012 9:18 AM

Hi

 

I am developing an application PDF-Viewer

 

I set annotations on my pdf document. My Pdf/javascript posts annotation list to html/javascript, html/javascript stores annotations into database through ajax.

 

When I restart my application, html/javascript retrieves all annotation from database and posts them to pdf/javascript. So they are added on my pdf document

 

Problem :

 

My PDF pages are loaded later than HTML document and I had Html/Javascript error:

postMessage is not a function

 

For correct this error I wrote something like that :

 

var a = (typeof myPDF.postMessage);

if(a != 'undefined')

myPDF.postMessage("test");

 

Now It works but not all time, sometimes I have an error :

Error calling method on NPObject

 

I think that my pdf document is not entirely loaded

 

Is it possible to signalilze from PDF that my document is ready?


 

More Like This

  • Retrieving data ...

Bookmarked By (0)

Answers + Points = Status

  • 10 points awarded for Correct Answers
  • 5 points awarded for Helpful Answers
  • 10,000+ points
  • 1,001-10,000 points
  • 501-1,000 points
  • 5-500 points