|
|
@ -1050,7 +1050,9 @@ var PDFView = { |
|
|
|
|
|
|
|
|
|
|
|
beforePrint: function pdfViewSetupBeforePrint() { |
|
|
|
beforePrint: function pdfViewSetupBeforePrint() { |
|
|
|
if (!this.supportsPrinting) { |
|
|
|
if (!this.supportsPrinting) { |
|
|
|
alert('Printing is not supported by this browser.'); |
|
|
|
var printMessage = mozL10n.get('printing_not_supported', null, |
|
|
|
|
|
|
|
'Warning: Printing is not supported by this browser.'); |
|
|
|
|
|
|
|
alert(printMessage); |
|
|
|
return; |
|
|
|
return; |
|
|
|
} |
|
|
|
} |
|
|
|
for (var i = 0, ii = this.pages.length; i < ii; ++i) { |
|
|
|
for (var i = 0, ii = this.pages.length; i < ii; ++i) { |
|
|
@ -1761,6 +1763,10 @@ window.addEventListener('load', function webViewerLoad(evt) { |
|
|
|
document.querySelector('#viewSearch').classList.remove('hidden'); |
|
|
|
document.querySelector('#viewSearch').classList.remove('hidden'); |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
if (!PDFView.supportsPrinting) { |
|
|
|
|
|
|
|
document.getElementById('print').classList.add('hidden'); |
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
// Listen for warnings to trigger the fallback UI. Errors should be caught
|
|
|
|
// Listen for warnings to trigger the fallback UI. Errors should be caught
|
|
|
|
// and call PDFView.error() so we don't need to listen for those.
|
|
|
|
// and call PDFView.error() so we don't need to listen for those.
|
|
|
|
PDFJS.LogManager.addLogger({ |
|
|
|
PDFJS.LogManager.addLogger({ |
|
|
|