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

Add a "supportsPrinting" viewer-option (bug 1957401)

This will allow us to respect the `print.enabled` Firefox preference, by extending [this method](https://searchfox.org/mozilla-central/rev/56117379696ea0cffb94cd09c14cd022a8c5e4e8/toolkit/components/pdfjs/content/PdfStreamConverter.sys.mjs#426-453), which will hide the toolbar and secondaryToolbar print-buttons.
This commit is contained in:
Jonas Jenwald 2025-04-15 12:36:39 +02:00
parent 2f7d163dfd
commit 97fe7d6a19
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() {