mirror of
https://github.com/mozilla/pdf.js.git
synced 2025-04-20 15:18:08 +02:00
[GeckoView] Skip fetching/parsing of pageLabels
Currently there's no toolbar in the GV-viewer, hence invoking the pageLabels functionality isn't meaningful and just leads to unnecessary parsing on both the main- and worker-threads. (And if a toolbar is added at some point, it's not clear to me if we'd want to support pageLabels in the GV-viewer anyway.)
This commit is contained in:
parent
8c4843f69a
commit
a348162c5b
1 changed files with 7 additions and 0 deletions
|
@ -1531,6 +1531,13 @@ const PDFViewerApplication = {
|
|||
* @private
|
||||
*/
|
||||
async _initializePageLabels(pdfDocument) {
|
||||
if (
|
||||
typeof PDFJSDev === "undefined"
|
||||
? window.isGECKOVIEW
|
||||
: PDFJSDev.test("GECKOVIEW")
|
||||
) {
|
||||
return;
|
||||
}
|
||||
const labels = await pdfDocument.getPageLabels();
|
||||
|
||||
if (pdfDocument !== this.pdfDocument) {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue