From a4aca8a20d2b1f7e8de8cae1018eab46aaa6dbb1 Mon Sep 17 00:00:00 2001 From: Calixte Denizet Date: Mon, 25 Mar 2024 17:31:15 +0100 Subject: [PATCH] Increase the maxCanvasPixels value to 2 ** 25 --- web/app_options.js | 2 +- web/pdf_page_view.js | 4 ++-- web/pdf_viewer.js | 2 +- 3 files changed, 4 insertions(+), 4 deletions(-) diff --git a/web/app_options.js b/web/app_options.js index 949265d7b..5f6d4f076 100644 --- a/web/app_options.js +++ b/web/app_options.js @@ -214,7 +214,7 @@ const defaultOptions = { }, maxCanvasPixels: { /** @type {number} */ - value: 16777216, + value: 2 ** 25, kind: OptionKind.VIEWER, }, forcePageColors: { diff --git a/web/pdf_page_view.js b/web/pdf_page_view.js index 22bf1dc59..be4950d8c 100644 --- a/web/pdf_page_view.js +++ b/web/pdf_page_view.js @@ -74,7 +74,7 @@ import { XfaLayerBuilder } from "./xfa_layer_builder.js"; * for annotation icons. Include trailing slash. * @property {number} [maxCanvasPixels] - The maximum supported canvas size in * total pixels, i.e. width * height. Use `-1` for no limit, or `0` for - * CSS-only zooming. The default value is 4096 * 4096 (16 mega-pixels). + * CSS-only zooming. The default value is 4096 * 8192 (32 mega-pixels). * @property {Object} [pageColors] - Overwrites background and foreground colors * with user defined ones in order to improve readability in high contrast * mode. @@ -162,7 +162,7 @@ class PDFPageView { this.imageResourcesPath = options.imageResourcesPath || ""; this.maxCanvasPixels = options.maxCanvasPixels ?? - (AppOptions.getCompat("maxCanvasPixels") || 16777216); + (AppOptions.getCompat("maxCanvasPixels") || 2 ** 25); this.pageColors = options.pageColors || null; this.eventBus = options.eventBus; diff --git a/web/pdf_viewer.js b/web/pdf_viewer.js index 7d617592d..268af114c 100644 --- a/web/pdf_viewer.js +++ b/web/pdf_viewer.js @@ -117,7 +117,7 @@ function isValidAnnotationEditorMode(mode) { * landscape pages upon printing. The default is `false`. * @property {number} [maxCanvasPixels] - The maximum supported canvas size in * total pixels, i.e. width * height. Use `-1` for no limit, or `0` for - * CSS-only zooming. The default value is 4096 * 4096 (16 mega-pixels). + * CSS-only zooming. The default value is 4096 * 8192 (32 mega-pixels). * @property {IL10n} [l10n] - Localization service. * @property {boolean} [enablePermissions] - Enables PDF document permissions, * when they exist. The default value is `false`.