pdf.js/extensions/chromium
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
..
options Support syncing of settings in Chrome extension 2016-05-25 00:51:51 +02:00
pageAction Uses editorconfig to maintain consistent coding styles 2015-11-14 07:32:18 +05:30
.gitignore Renaming of extensions/chrome folder to extensions/chromium, and small tweak to manifest.json description as per #3600 2013-08-21 18:11:35 +02:00
contentscript.js Force inline block display style for <object>. 2016-06-11 15:54:16 +02:00
contentstyle.css <object> / <embed> support in Chromium extension 2014-05-09 15:46:12 +02:00
extension-router.js Uses editorconfig to maintain consistent coding styles 2015-11-14 07:32:18 +05:30
feature-detect.js Uses editorconfig to maintain consistent coding styles 2015-11-14 07:32:18 +05:30
icon16.png optimize png images using zopflipng 2016-07-10 17:49:16 +08:00
icon19.png optimize png images using zopflipng 2016-07-10 17:49:16 +08:00
icon38.png optimize png images using zopflipng 2016-07-10 17:49:16 +08:00
icon48.png optimize png images using zopflipng 2016-07-10 17:49:16 +08:00
icon128.png optimize png images using zopflipng 2016-07-10 17:49:16 +08:00
manifest.json Remove support for frames in old Chromium versions 2016-05-10 22:40:07 +02:00
pdfHandler-vcros.js Uses editorconfig to maintain consistent coding styles 2015-11-14 07:32:18 +05:30
pdfHandler.html Add opt-out telemetry to the Chrome extension 2016-06-03 20:36:57 +02:00
pdfHandler.js Deduct file type from content-disposition 2016-09-17 22:34:18 -07:00
preferences_schema.json Add support for PageLabels in the viewer 2016-10-26 13:30:36 +02:00
preserve-referer.js Uses editorconfig to maintain consistent coding styles 2015-11-14 07:32:18 +05:30
restoretab.html Restore extension tab after reload 2015-08-14 19:00:12 +02:00
restoretab.js Uses editorconfig to maintain consistent coding styles 2015-11-14 07:32:18 +05:30
suppress-update.js Uses editorconfig to maintain consistent coding styles 2015-11-14 07:32:18 +05:30
telemetry.js Fix typo in telemetry.js, follow-up to #7370 2016-06-03 23:28:01 +02:00