Yetangitu / owncloud-apps

Applications for Nextcloud and Owncloud personal cloud server
GNU Affero General Public License v3.0
86 stars 41 forks source link

Can't open a specific PDF page #83

Open smnbgn opened 6 years ago

smnbgn commented 6 years ago

I have the version 1.2.3 installed and still can't select a specific PDF page to open in the upper page search box. Most of the time I can't even type anything in the box since it doesn't appear at all.

When I can type something, an another page opens. For example: I type page 20, but page 10 opens instead.

Since bookmarks also don't work as mentioned in a previous issue, the ebook reader plugin is unusable for me. Please fix this.

Yetangitu commented 6 years ago

Which search box are you referring to? If it is the one in the top-right of the Files app you're at the wrong address as it is part of the Files app. Reader does have a search function in the sidebar, on the top left side of the page. It also has a page entry box, in the middle of the title/toolbar.

Also interesting to know is which browser on which platform you're using.

Yetangitu commented 6 years ago

image

Reader's search feature, using its own search entry box, not connected to the Files app search box (which Reader currently ignores).

smnbgn commented 6 years ago

I don't mean the search box. I mean the current page box. It displays normally in IE, but it doesn't show in Firefox 58.0.2. I'm using Windows 10.

The current page is still off. I entered 50 and got page 33.

Yetangitu commented 6 years ago

The page number you enter is the physical page number, not the logical page number. Many non-fiction books have a long section in front before logical page #1.

The current page box does work for me in Firefox nightly (currently 60.0a1):

image

Seeing that you mention IE I assume you use Windows. I'll have to crank up a VM sometime to test it there as I'm on Linux myself, not that it should make much difference.

smnbgn commented 6 years ago

Both problems also appear on Ubuntu.

Yes, the contents at the beginning of the book are listed in roman numerals, but it's crazy that you get back a different page from the one you enter. Choose either logical or physical, don't mix them up.

Yetangitu commented 6 years ago

In correctly indexed and linked books you can just click on links in the index. Reader currently does not know about logical pages and as such does not 'mix them up' (whatever that might mean).

image Physical page 8-9, logical page 3-4

smnbgn commented 6 years ago

If I enter page 10, I get pages IX and X, if I enter 70, I get pages 51 and 52. How am I supposed to know which logical page maps to which physical page?

Other PDF readers display both logical and physical pages for a reason.

Yetangitu commented 6 years ago

In that case your book has a roman-numeral section of around 18 pages in front. The PDF renderer is based on Mozilla's pdf.js and shares most of its features, including the way page numbers work. I just checked and saw the feature has been implemented in the core of pdf.js (https://github.com/mozilla/pdf.js/pull/6803). I'll see if I can implement it in Reader.

Yetangitu commented 6 years ago

BTW, there are many PDF readers which do not support page labels. If this feature is very important for you you could always submit a pull request.