Skip to content

Commit 63e6566

Browse files
Merge pull request #19816 from Snuffleupagus/bug-1957401
Add a "supportsPrinting" viewer-option (bug 1957401)
2 parents 213d51d + 97fe7d6 commit 63e6566

2 files changed

Lines changed: 11 additions & 1 deletion

File tree

web/app.js

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -875,7 +875,12 @@ const PDFViewerApplication = {
875875
},
876876

877877
get supportsPrinting() {
878-
return PDFPrintServiceFactory.supportsPrinting;
878+
return shadow(
879+
this,
880+
"supportsPrinting",
881+
AppOptions.get("supportsPrinting") &&
882+
PDFPrintServiceFactory.supportsPrinting
883+
);
879884
},
880885

881886
get supportsFullscreen() {

web/app_options.js

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -136,6 +136,11 @@ const defaultOptions = {
136136
value: true,
137137
kind: OptionKind.BROWSER,
138138
},
139+
supportsPrinting: {
140+
/** @type {boolean} */
141+
value: true,
142+
kind: OptionKind.BROWSER,
143+
},
139144
toolbarDensity: {
140145
/** @type {number} */
141146
value: 0, // 0 = "normal", 1 = "compact", 2 = "touch"

0 commit comments

Comments
 (0)