-
Notifications
You must be signed in to change notification settings - Fork 10.2k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Hook page labels into the viewer #6902
Comments
As an end user, lack of support for use of page labels as page numbers is one of the primary reasons I don't use PDF.js. 99% of the PDFs I use regularly (weekly, if not daily) use page labels to maintain consistence of page numbering between print and PDF editions with lots of cross-referencing by number (label) between documents. I am of the strong opinion there should at least be a configurable option to allow the use of page labels in the page number box — though I would be fine if that is not default, or requires a prefix, or similar. |
@Celti Thank you for your feedback! It helps us to assess the importance of the issue. As a user, do you think the behavior of Adobe Reader/Acrobat is the most intuitive? If not, how would you suggest that this should work to not confuse users as mentioned above? The situation I'm afraid of is when we have page labels Ideas for a logical implementation in the viewer are appreciated since most of us don't use this on such a regular basis and we want to make sure that the implementation is intuitive. |
For files containing page labels, it seems that in Adobe Reader
For consistency, it might make sense to try and mimic the behaviour of Adobe Reader, since that might be what people expect (even if that isn't perhaps the most intuitive). |
What I currently use is SumatraPDF, which allows you to enter page labels in the text box, but shows both the current page label and the actual discrete page number. If you enter a page label, it takes you to that page label. If you enter something not a valid page label for the current document, it tries to interpret it as a page number, allowing a shortcut of, e.g., '100!' to take you to the physical page 100 and not page label 100 (assuming 100! doesn't exist as a page label). It seems to me that one could either do page labels by default and define '!100' or similar as a 'go to physical page' command, or do physical pages by default and have '!label' take you to the labelled page. |
I'll try to prototype something similar to Adobe Reader (visually/functionality wise) for this feature, just to better help us assess the potential implementation/interaction issues with this feature. |
Please see the following prototype: master...Snuffleupagus:page-labels-viewer. |
I think this is a pretty clean solution! If you can add the preference to https://github.com/mozilla/pdf.js/blob/master/extensions/chromium/preferences_schema.json and create a PR for it, we can review this further (and create previews for testing). |
Closing as fixed by #6945. |
Thanks to #6803 we have API support for page labels. We need to decide if/how we want to hook this into the viewer. Yury suggested we might show these in the thumbnails panel. Adobe also uses these labels in the page number box, but when we do this we must be careful not to confuse users (if a user enters 1, does he mean page index 1 or page label 1?).
The text was updated successfully, but these errors were encountered: