pdf.js/web
Jonas Jenwald f461fd64aa Add support for PageLabels in the viewer
This patch implements the page label functionality in a similar way as Adobe Reader.
For documents with page labels, if a non-existent page label is entered we'll try to fallback to the page number instead.
The patch also includes a preference (`disablePageLabels`), to make it easy to opt-out of using page labels if the user/implementor so wishes.

The way that `get/set currentPageLabel` is implemented in `PDFViewer`, is as wrappers for the corresponding `get/set currentPageNumber` functions, since that seemed like the cleanest solution.
The page labels are purposely *only* added to the page controls in the viewer UI, and not stored in e.g. the `ViewHistory`. Since doing so would mean adding unnecessary code complexity, without any real added value, and would also mean delaying the inital loading of PDF documents.

Note that this patch will ignore page labels if they are identical to standard page numbering, since in this case displaying the page labels adds no value (but only UI noise). The reason for handling this case specially, is that in practice a surprising number of PDF files include "pointless" page labels.
2016-10-26 13:30:36 +02:00
..
images optimize png images using zopflipng 2016-07-10 17:49:16 +08:00
.gitignore Remove obselete file from .gitignore 2015-01-26 16:44:45 +01:00
annotation_layer_builder.css Choice widget annotations: core and display layer implementation 2016-10-05 21:25:29 +02:00
annotation_layer_builder.js Interactive forms: remove global PDFJS usage 2016-09-19 00:12:42 +02:00
app.js Add support for PageLabels in the viewer 2016-10-26 13:30:36 +02:00
chrome-i18n-allow-access-to-file-urls.json Add translations of "Allow access to file URLs" 2015-08-14 18:59:55 +02:00
chromecom.js Replaces all preprocessor directives with PDFJSDev calls. 2016-10-14 10:57:53 -05:00
compatibility.js Added context to compatibility.js to have 'use strict' directive in our context only 2016-05-12 10:04:51 +02:00
compressed.tracemonkey-pldi-09.pdf Add Makefile. Move some files around to make building the website easier. 2011-07-05 10:53:57 -07:00
debugger.js trivial spelling fixes 2016-07-17 14:33:41 +02:00
default_preferences.js Moves DEFAULT_PREFENCES into JSON format. 2016-05-11 17:58:17 -05:00
default_preferences.json Add support for PageLabels in the viewer 2016-10-26 13:30:36 +02:00
dom_events.js Remove the previousPageNumber parameter from the pagechanging/pagechange` events, and stop dispatching the events if the input is out of bounds 2016-07-25 10:08:53 +02:00
download_manager.js Deprecate the isValidUrl utility function and replace it with createValidAbsoluteUrl/isValidProtocal functions instead, since the main URL validation is now done using the new URL constructor 2016-10-19 22:11:22 +02:00
firefox_print_service.js Removes mozPrintCallback polyfill, converts canvas to PNG. 2016-10-11 10:08:13 -05:00
firefoxcom.js Replaces all preprocessor directives with PDFJSDev calls. 2016-10-14 10:57:53 -05:00
grab_to_pan.js Update to latest grab-to-pan version 2016-10-14 00:55:58 +02:00
hand_tool.js Removes circular dependency of secondary toolbar on app.js. 2016-04-28 15:04:09 -05:00
interfaces.js Interactive forms: remove global PDFJS usage 2016-09-19 00:12:42 +02:00
overlay_manager.js Moves all document.getElementById lookups into viewer.js 2016-04-21 11:39:11 -05:00
password_prompt.js Moves all document.getElementById lookups into viewer.js 2016-04-21 11:39:11 -05:00
pdf_attachment_viewer.js Adds EventBus. 2016-04-28 06:57:24 -05:00
pdf_document_properties.js Moves all document.getElementById lookups into viewer.js 2016-04-21 11:39:11 -05:00
pdf_find_bar.js Added multiple term search functionality (with default phrase search) 2016-05-26 18:24:58 +05:00
pdf_find_controller.js Prevent destinations with bad left/top values from scrolling the wrong page into view (bug 874482) 2016-08-07 16:20:18 +02:00
pdf_history.js Replaces all preprocessor directives with PDFJSDev calls. 2016-10-14 10:57:53 -05:00
pdf_link_service.js Prevent destinations with bad left/top values from scrolling the wrong page into view (bug 874482) 2016-08-07 16:20:18 +02:00
pdf_outline_viewer.js Move parsing of destination dictionaries to a helper function 2016-10-18 16:14:07 +02:00
pdf_page_view.js Replaces all preprocessor directives with PDFJSDev calls. 2016-10-14 10:57:53 -05:00
pdf_presentation_mode.js Replaces all preprocessor directives with PDFJSDev calls. 2016-10-14 10:57:53 -05:00
pdf_print_service.js Localization of the print dialog. 2016-10-11 10:08:13 -05:00
pdf_rendering_queue.js Introduces UMD headers to the web/ folder. 2016-04-13 10:09:48 -05:00
pdf_sidebar.js Adds EventBus. 2016-04-28 06:57:24 -05:00
pdf_thumbnail_view.js Replaces all preprocessor directives with PDFJSDev calls. 2016-10-14 10:57:53 -05:00
pdf_thumbnail_viewer.js Add support for PageLabels in the viewer 2016-10-26 13:30:36 +02:00
pdf_viewer.component.js Fixes AMD name in the web/pdf_viewer.js. 2016-05-16 12:01:29 -05:00
pdf_viewer.css Better components examples. 2016-04-28 13:30:03 -05:00
pdf_viewer.js Add support for PageLabels in the viewer 2016-10-26 13:30:36 +02:00
pdfjs.js Replace pdfjsLib with module that represents pdf.js. 2016-04-13 10:11:34 -05:00
preferences.js Replaces all preprocessor directives with PDFJSDev calls. 2016-10-14 10:57:53 -05:00
secondary_toolbar.js Ensure that we provide the source parameter when dispatching the button click events in SecondaryToolbar (PR 7313 follow-up) 2016-09-09 08:16:10 +02:00
text_layer_builder.css Use default line height for the text layer 2015-12-02 23:00:12 +01:00
text_layer_builder.js Replaces all preprocessor directives with PDFJSDev calls. 2016-10-14 10:57:53 -05:00
ui_utils.js Replaces all preprocessor directives with PDFJSDev calls. 2016-10-14 10:57:53 -05:00
view_history.js Replaces all preprocessor directives with PDFJSDev calls. 2016-10-14 10:57:53 -05:00
viewer-snippet-chrome-extension.html Remove type="text/javascript" from script tags. 2014-05-13 02:41:01 +02:00
viewer-snippet-chrome-overlays.html Add translations of "Allow access to file URLs" 2015-08-14 18:59:55 +02:00
viewer-snippet-firefox-extension.html Remove XHTML leftovers from the viewer HTML files 2016-02-14 13:23:34 +01:00
viewer-snippet-minified.html Remove XHTML leftovers from the viewer HTML files 2016-02-14 13:23:34 +01:00
viewer-snippet.html Remove XHTML leftovers from the viewer HTML files 2016-02-14 13:23:34 +01:00
viewer.css Remove the "Page: " label and replace it with a tooltip 2016-10-26 13:30:26 +02:00
viewer.html Remove the "Page: " label and replace it with a tooltip 2016-10-26 13:30:26 +02:00
viewer.js Replaces all preprocessor directives with PDFJSDev calls. 2016-10-14 10:57:53 -05:00