Closed curiosport closed 5 years ago
The core method counting the pages is PageTreeNode#each_page
. It returns a page Enumerator whose #size method will return the number of pages. It has to be used on the root tree node to get the total number of pages in the document.
However the code is totally dependent on the rest of the framework, so it's not like you will be able to extract it and run it separately.
Hello.
What part of your code counts pages in a pdf? I would like to be able to use that code without having to import the gem into my module.
Thank you.