1
0
Fork 0
mirror of https://github.com/mozilla/pdf.js.git synced 2025-04-20 15:18:08 +02:00

Increase the maxCanvasPixels value to 2 ** 25

This commit is contained in:
Calixte Denizet 2024-03-25 17:31:15 +01:00
parent ad791cc462
commit a4aca8a20d
3 changed files with 4 additions and 4 deletions

View file

@ -214,7 +214,7 @@ const defaultOptions = {
},
maxCanvasPixels: {
/** @type {number} */
value: 16777216,
value: 2 ** 25,
kind: OptionKind.VIEWER,
},
forcePageColors: {

View file

@ -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;

View file

@ -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`.