f461fd64aa
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. |
||
---|---|---|
.. | ||
options | ||
pageAction | ||
.gitignore | ||
contentscript.js | ||
contentstyle.css | ||
extension-router.js | ||
feature-detect.js | ||
icon16.png | ||
icon19.png | ||
icon38.png | ||
icon48.png | ||
icon128.png | ||
manifest.json | ||
pdfHandler-vcros.js | ||
pdfHandler.html | ||
pdfHandler.js | ||
preferences_schema.json | ||
preserve-referer.js | ||
restoretab.html | ||
restoretab.js | ||
suppress-update.js | ||
telemetry.js |