I’m using Pdf tron
Please give a brief summary of your issue:
I want to get current page in a pdf and total number of the pages in that pdf. Also How many time a user spends in reading that PDF.
Please describe your issue and provide steps to reproduce it:
(The more descriptive your answer, the faster we are able to help you)
Please provide a link to a minimal sample where the issue is reproducible:
Thanks for contacting us. Are you currently integrating using the PdfViewCtrl class or via Fragment? You can read more about integrating via Fragment here
In order to get the current page in a PDF you can use PdfViewCtrl.getCurrentPage()
And to get the total number of pages you can use PdfViewCtrl.getPageCount()
If you are currently using the FragmentViewer, you will need to access the PdfViewCtrl object via the following:
PdfViewCtrl pdfViewCtrl = hostFragment.getCurrentPdfViewCtrlFragment().getPDFViewCtrl();
We do not currently have a way to get the amount of time a user has spent reading a PDF. We recommend implementing this on your end by keeping a timestamp after the user has opened a specific document and compare it with the timestamp after the user has closed that document and compute the difference.