Skip to content

Commit

Permalink
Merge pull request #17837 from calixteman/increase_max_canvas_pixels
Browse files Browse the repository at this point in the history
Increase the maxCanvasPixels value to 2 ** 25
  • Loading branch information
calixteman authored Mar 25, 2024
2 parents 3110a8a + a4aca8a commit 3d7ea60
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 4 deletions.
2 changes: 1 addition & 1 deletion web/app_options.js
Original file line number Diff line number Diff line change
Expand Up @@ -214,7 +214,7 @@ const defaultOptions = {
},
maxCanvasPixels: {
/** @type {number} */
value: 16777216,
value: 2 ** 25,
kind: OptionKind.VIEWER,
},
forcePageColors: {
Expand Down
4 changes: 2 additions & 2 deletions web/pdf_page_view.js
Original file line number Diff line number Diff line change
Expand Up @@ -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.
Expand Down Expand Up @@ -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;
Expand Down
2 changes: 1 addition & 1 deletion web/pdf_viewer.js
Original file line number Diff line number Diff line change
Expand Up @@ -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`.
Expand Down

0 comments on commit 3d7ea60

Please sign in to comment.