|
|
@@ -8,6 +8,7 @@ import {
|
|
|
LinkTarget,
|
|
|
} from 'pdfjs-dist/web/pdf_viewer.mjs'
|
|
|
import 'pdfjs-dist/web/pdf_viewer.css'
|
|
|
+import browser from '@/features/source-editor/extensions/browser'
|
|
|
|
|
|
const DEFAULT_RANGE_CHUNK_SIZE = 128 * 1024 // 128K chunks
|
|
|
|
|
|
@@ -36,7 +37,7 @@ export default class PDFJSWrapper {
|
|
|
eventBus: this.eventBus,
|
|
|
imageResourcesPath,
|
|
|
linkService: this.linkService,
|
|
|
- maxCanvasPixels: 8192 * 8192, // default is 4096 * 4096, increased for better resolution at high zoom levels
|
|
|
+ maxCanvasPixels: browser.safari ? 4096 * 4096 : 8192 * 8192, // default is 4096 * 4096, increased for better resolution at high zoom levels (but not in Safari, which struggles with large canvases)
|
|
|
annotationMode: PDFJS.AnnotationMode.ENABLE, // enable annotations but not forms
|
|
|
annotationEditorMode: PDFJS.AnnotationEditorType.DISABLE, // disable annotation editing
|
|
|
})
|