How to save ebook reading position?

Hi, i want to create ebook app, but can’t figure out how to save and open the last position of the book being read, can someone help me with the blok command? Tq​:pray::pray::pray:

Before doing that how can you show your ebook inside app? i mean to say pdf

Can u help me?:pray::pray::pray: