3D FlipBook - Current page number

m***a@unthinkable.co
2021-01-27
2021-01-29

How can i get the current page number of the pdf? Also, i need to maintain a variable which will store current page number so that it gets updated whenever the page is changed. After pdf is closed, I want to bring the user to the same page where he left last time. I need to know if you provide this info, then only i will be able to purchase the full version.

Replies

a***r@3dflipbook.net
2021-01-29
2021-01-29

Like this:

var scene = $('#container').FlipBook({
...,
  ready: function(scene) {
    console.log(scene.ctrl.getPage());
    scene.ctrl.goToPage(10)
  }
});
m***a@unthinkable.co
2021-01-29
2021-01-29

Thank you for your reply! Wouldn't this only give the current page number when pdf is opened? I want to maintain a variable which will store the page number and update itself whenever the page is turned(next or previous action is performed).

m***a@unthinkable.co
2021-01-29
2021-01-29

scene.ctrl.goToPage(4) this is working and it takes me to the 4th page of the pdf. console.log(scene.ctrl.getPage()); this is not working

a***r@3dflipbook.net
2021-01-29
2021-01-29

It returns current active page from 0 to n-1 goToPage uses the same range

m***a@unthinkable.co
2021-01-29
2021-01-29

Got it! Thanks!

m***a@unthinkable.co
2021-01-29
2021-01-29

var book = $('.sample-container').FlipBook({ pdf: pdf, ready: function (scene) { scene.ctrl.goToPage(4); console.log(scene.ctrl.getPage()); } }); To get the current page, use book.ctrl.getPage()

Log In to leave a comment