1
0
Fork 0
mirror of https://github.com/mozilla/pdf.js.git synced 2025-04-29 07:37:57 +02:00

Merge pull request #19816 from Snuffleupagus/bug-1957401

Add a "supportsPrinting" viewer-option (bug 1957401)
This commit is contained in:
Jonas Jenwald 2025-04-22 15:25:20 +02:00 committed by GitHub
commit 63e6566597
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
2 changed files with 11 additions and 1 deletions

View file

@ -875,7 +875,12 @@ const PDFViewerApplication = {
},
get supportsPrinting() {
return PDFPrintServiceFactory.supportsPrinting;
return shadow(
this,
"supportsPrinting",
AppOptions.get("supportsPrinting") &&
PDFPrintServiceFactory.supportsPrinting
);
},
get supportsFullscreen() {

View file

@ -136,6 +136,11 @@ const defaultOptions = {
value: true,
kind: OptionKind.BROWSER,
},
supportsPrinting: {
/** @type {boolean} */
value: true,
kind: OptionKind.BROWSER,
},
toolbarDensity: {
/** @type {number} */
value: 0, // 0 = "normal", 1 = "compact", 2 = "touch"