mirror of
https://github.com/zen-browser/pdf.js.git
synced 2025-07-09 17:55:37 +02:00
Do the AppOptions.get("printResolution")
lookup once in web/app.js
, when initializing PDFPrintServiceFactory
-instances, rather than for every printed page
There's really no point in repeating these lookups over and over, since the value should be constant for the duration of one print invocation anyway.
This commit is contained in:
parent
63e33a5895
commit
97d796e372
3 changed files with 74 additions and 15 deletions
|
@ -1609,10 +1609,13 @@ const PDFViewerApplication = {
|
|||
|
||||
const pagesOverview = this.pdfViewer.getPagesOverview();
|
||||
const printContainer = this.appConfig.printContainer;
|
||||
const printResolution = AppOptions.get("printResolution");
|
||||
|
||||
const printService = PDFPrintServiceFactory.instance.createPrintService(
|
||||
this.pdfDocument,
|
||||
pagesOverview,
|
||||
printContainer,
|
||||
printResolution,
|
||||
this.l10n
|
||||
);
|
||||
this.printService = printService;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue