RadaeePDF.com :: Topic: How to call getPageNumber on PDF reader close (1/1)
Welcome, Guest
Username: Password: Remember me

Signin/Signup with:

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

TOPIC: How to call getPageNumber on PDF reader close

How to call getPageNumber on PDF reader close 3 months 2 weeks ago #12688

Hello,

In your knowledge base you have the function :
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
The administrator has disabled public write access.

How to call getPageNumber on PDF reader close 3 months 2 weeks ago #12706

Hello,
In your knowledge base you have the function :
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
The administrator has disabled public write access.

How to call getPageNumber on PDF reader close 3 months 2 weeks ago #12707

  • breness_21
  • breness_21's Avatar
  • OFFLINE
  • Fresh Boarder
  • Posts: 2
  • Karma: 0
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:
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?
The administrator has disabled public write access.

How to call getPageNumber on PDF reader close 3 months 1 week ago #12721

  • emanuele
  • emanuele's Avatar
  • OFFLINE
  • Moderator
  • Posts: 440
  • Thank you received: 50
  • Karma: 14
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.
The administrator has disabled public write access.

How to call getPageNumber on PDF reader close 2 months 3 weeks ago #12794

  • ieee_mcoe
  • ieee_mcoe's Avatar
  • OFFLINE
  • Fresh Boarder
  • Posts: 1
  • Karma: 0
Has the callback mentioned above been implemented yet?
If not, what is the estimated delivery date for the new feature?
The administrator has disabled public write access.

How to call getPageNumber on PDF reader close 2 months 2 weeks ago #12823

  • emanuele
  • emanuele's Avatar
  • OFFLINE
  • Moderator
  • Posts: 440
  • Thank you received: 50
  • Karma: 14
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: http://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: 2 months 2 weeks ago by emanuele.
The administrator has disabled public write access.
Powered by Kunena Forum