Microsoft Windows Phone 8.1 support ends (13 Jul 2017)

Microsoft has ended support for Windows Phone 8.1

Development and suggestions about third part tool integration.
Cordova, Xamarin, Basic4Android topics are listed here.

How to call getPageNumber on PDF reader close

More
IP: 192.168.0.71 8 years 7 months ago #12688 by stacy_brenes
Hello,

In your knowledge base you have the function :
Code:
RadaeePDFPlugin.getPageNumber( {}, function(message){ console.log("Success: " + message);}, function(err){ console.log("Failure: " + err);} );

In the scenario where we open the PDF in the reader, scroll to page 20 and then close the pdf - we are only able to call getPageNumber() AFTER the pdf reader closes and the user returns to our app. (we have a button called getPageNumber on the screen)

The current scenario:
  1. open the reader
  2. read to page X
  3. user clicks to close the reader
  4. reader closes
  5. click button 'Get page number' --> getPageNumber returns page number

How can we (using javascript) call the getPageNumber() function when the user closes the reader. Meaning, when the user clicks to exit the reader, at that moment, how can we (using javascript) listen or subscribe to that event to record the last page number the user was on.

What we want to do:
  1. open the reader
  2. read to page X
  3. user clicks to close the reader
  4. call 'getPageNumber' --> getPageNumber returns page number
  5. reader closes

Thanks in advance for your help,
-Stacy
More
IP: 192.168.0.71 8 years 7 months ago #12706 by stacy_brenes
Hello,
In your knowledge base you have the function :
Code:
RadaeePDFPlugin.getPageNumber( {}, function(message){ console.log("Success: " + message);}, function(err){ console.log("Failure: " + err);} );

In the scenario where we open the PDF in the reader, scroll to page 20 and then close the pdf - we are only able to call getPageNumber() AFTER the pdf reader closes and the user returns to our app. (we have a button called getPageNumber on the screen)

The current scenario:
  1. open the reader
  2. read to page X
  3. user clicks to close the reader
  4. reader closes
  5. click button 'Get page number' --> getPageNumber returns page number

How can we (using javascript) call the getPageNumber() function when the user closes the reader. Meaning, when the user clicks to exit the reader, at that moment, how can we (using javascript) listen or subscribe to that event to record the last page number the user was on.

What we want to do:
  1. open the reader
  2. read to page X
  3. user clicks to close the reader
  4. call 'getPageNumber' --> getPageNumber returns page number
  5. reader closes

Thanks in advance for your help,
-Stacy
More
IP: 192.168.0.71 8 years 7 months ago #12707 by breness_21
We are trying to write a feature in the application that remembers the last page the user read in a given PDF (our app hosts multiple different PDF's). We saw in your knowledge base that you have the code for getPageNumber() as follows:
Code:
RadaeePDFPlugin.getPageNumber( {}, function(message){ console.log("Success: " + message); }, function(err){ console.log("Failure: " + err); } );

We were able to retrieve the last page read AFTER the user closed the reader using a button -- the steps are as follows:
  1. The user opens a pdf in the Radaee PDF reader
  2. The user scrolls to page X
  3. The user clicks to close the reader
  4. The reader closes
  5. The user clicks a button to see the last page he read in the PDF reader (the button calls RadaeePDFPlugin.getPageNumber() )

We want to call the RadaeePDFPlugin.getPageNumber() function on close of the reader. Meaning, we want to listen for the onClose/willClose event to remember the last page the user read. The steps would look something like this:
  1. The user opens a pdf in the Radaee PDF reader
  2. The user scrolls to page X
  3. The user clicks to close the reader
  4. The getPageNumber() returns page X
  5. The reader closes and returns the user to the page he was on before

Does your plugin have a way for us to do this?
More
IP: 192.168.0.71 8 years 7 months ago #12721 by emanuele
Hi,
actual Cordova plugin can't satisfy your needs but, later during August, we will release a new Android/iOS update allowing the setup of JS callback which shall solve your needs.
More
IP: 192.168.0.71 8 years 6 months ago #12794 by ieee_mcoe
Has the callback mentioned above been implemented yet?
If not, what is the estimated delivery date for the new feature?
More
IP: 192.168.0.71 8 years 6 months ago - 8 years 6 months ago #12823 by emanuele
Hi,
a new cordova version has been released.
In this version also callbacks from reader are available.
Here is an article that shows how to use these callbacks: www.radaeepdf.com/support/knowledge-base?view=kb&kbartid=101

In this case you can use didChangePage callback to store the current page and didCloseReader callback will notice you when the reader has been closed
Last edit: 8 years 6 months ago by emanuele.
Time to create page: 0.424 seconds
Powered by Kunena Forum