|
|
|
@ -101,7 +101,6 @@ var SCALE_SELECT_CONTAINER_PADDING = 8;
@@ -101,7 +101,6 @@ var SCALE_SELECT_CONTAINER_PADDING = 8;
|
|
|
|
|
var SCALE_SELECT_PADDING = 22; |
|
|
|
|
var PAGE_NUMBER_LOADING_INDICATOR = 'visiblePageIsLoading'; |
|
|
|
|
var DISABLE_AUTO_FETCH_LOADING_BAR_TIMEOUT = 5000; |
|
|
|
|
var ENHANCE_TEXT_SELECTION = false; |
|
|
|
|
|
|
|
|
|
function configure(PDFJS) { |
|
|
|
|
PDFJS.imageResourcesPath = './images/'; |
|
|
|
@ -211,7 +210,7 @@ var PDFViewerApplication = {
@@ -211,7 +210,7 @@ var PDFViewerApplication = {
|
|
|
|
|
renderingQueue: pdfRenderingQueue, |
|
|
|
|
linkService: pdfLinkService, |
|
|
|
|
downloadManager: downloadManager, |
|
|
|
|
enhanceTextSelection: ENHANCE_TEXT_SELECTION, |
|
|
|
|
enhanceTextSelection: false, |
|
|
|
|
}); |
|
|
|
|
pdfRenderingQueue.setViewer(this.pdfViewer); |
|
|
|
|
pdfLinkService.setViewer(this.pdfViewer); |
|
|
|
@ -323,6 +322,18 @@ var PDFViewerApplication = {
@@ -323,6 +322,18 @@ var PDFViewerApplication = {
|
|
|
|
|
Preferences.get('defaultZoomValue').then(function resolved(value) { |
|
|
|
|
self.preferenceDefaultZoomValue = value; |
|
|
|
|
}), |
|
|
|
|
Preferences.get('enhanceTextSelection').then(function resolved(value) { |
|
|
|
|
// TODO: Move the initialization and fetching of `Preferences` to occur
|
|
|
|
|
// before the various viewer components are initialized.
|
|
|
|
|
//
|
|
|
|
|
// This was attempted in: https://github.com/mozilla/pdf.js/pull/7586,
|
|
|
|
|
// but it had to be backed out since it violated implicit assumptions
|
|
|
|
|
// about some viewer components being synchronously available.
|
|
|
|
|
//
|
|
|
|
|
// NOTE: This hack works since the `enhanceTextSelection` option is not
|
|
|
|
|
// needed until `PDFViewer.setDocument` has been called.
|
|
|
|
|
self.pdfViewer.enhanceTextSelection = value; |
|
|
|
|
}), |
|
|
|
|
Preferences.get('disableTextLayer').then(function resolved(value) { |
|
|
|
|
if (PDFJS.disableTextLayer === true) { |
|
|
|
|
return; |
|
|
|
|