Number of pages in a document does not update if the file is replaced with a longer/shorter one
After updating a file which was previously opened, there are some issues. For example, previously it was foo.pdf with 10 pages, and I updated foo.pdf (in the same location) to attach 10 pages, then I open foo.pdf and Document Viewer gives me only first 10 pages to view. If I move foo.pdf to somewhere else and reopen it, then I can view the whole file.
It seems to me that the history data affects, and hashing isn't coded well.
Document Viewer v2.7.3 on Android
I think the problem is located here: https://github.com/SufficientlySecure/document-viewer/blob/master/document-viewer/src/main/java/org/ebookdroid/core/models/DocumentModel.java#L333
The DocumentInfo it's loading from a cache file contains the number of pages. The cache file name is only based on the document's filename.
Another aspect of this problem is that all files opened from the "Downloads" app, which are opened through a content:// URI, share their book settings / current page.