Signin/Signup with: 
Welcome, Guest
Username: Password: Remember me
Development and suggestions about third part tool integration.
Cordova, Xamarin, Basic4Android topics are listed here.
  • Page:
  • 1

TOPIC:

How to call getPageNumber on PDF reader close 6 years 8 months ago #12688

  • stacy_brenes
  • stacy_brenes's Avatar Topic Author
  • Offline
  • New Member
  • New Member
  • Posts: 7
  • Thank you received: 0
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

Please Log in or Create an account to join the conversation.

How to call getPageNumber on PDF reader close 6 years 8 months ago #12706

  • stacy_brenes
  • stacy_brenes's Avatar Topic Author
  • Offline
  • New Member
  • New Member
  • Posts: 7
  • Thank you received: 0
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

Please Log in or Create an account to join the conversation.

How to call getPageNumber on PDF reader close 6 years 8 months ago #12707

  • breness_21
  • breness_21's Avatar
  • Offline
  • User is blocked
  • User is blocked
  • Posts: 2
  • Thank you received: 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?

Please Log in or Create an account to join the conversation.

How to call getPageNumber on PDF reader close 6 years 8 months ago #12721

  • emanuele
  • emanuele's Avatar
  • Offline
  • User is blocked
  • User is blocked
  • Posts: 580
  • Thank you received: 67
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.

Please Log in or Create an account to join the conversation.

How to call getPageNumber on PDF reader close 6 years 7 months ago #12794

  • ieee_mcoe
  • ieee_mcoe's Avatar
  • Offline
  • New Member
  • New Member
  • Posts: 1
  • Thank you received: 0
Has the callback mentioned above been implemented yet?
If not, what is the estimated delivery date for the new feature?

Please Log in or Create an account to join the conversation.

How to call getPageNumber on PDF reader close 6 years 7 months ago #12823

  • emanuele
  • emanuele's Avatar
  • Offline
  • User is blocked
  • User is blocked
  • Posts: 580
  • Thank you received: 67
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

Please Log in or Create an account to join the conversation.

Last edit: by emanuele.
  • Page:
  • 1
Powered by Kunena Forum