I got an ebook ***.azw3. After converting to pdf file. I didn't have its page number. But there is an index in the book. The index has links to specific pages. So I wrote a python script to produce the page numbers by the index.
You might need to create test.xlsx by youself.