mirror of
https://github.com/zen-browser/pdf.js.git
synced 2025-07-10 02:05:37 +02:00
Move the maxCanvasPixels
option to a BaseViewer
/PDFPageView
option
This removes the `PDFJS.maxCanvasPixels` dependency from the viewer components, but please note that as a *temporary* solution the default viewer still uses it.
This commit is contained in:
parent
f4280368f7
commit
fdf99c6af5
3 changed files with 18 additions and 5 deletions
|
@ -50,6 +50,9 @@ const DEFAULT_CACHE_SIZE = 10;
|
|||
* @property {string} renderer - 'canvas' or 'svg'. The default is 'canvas'.
|
||||
* @property {boolean} useOnlyCssZoom - (optional) Enables CSS only zooming.
|
||||
* The default value is `false`.
|
||||
* @property {number} maxCanvasPixels - (optional) The maximum supported canvas
|
||||
* size in total pixels, i.e. width * height. Use -1 for no limit.
|
||||
* The default value is 4096 * 4096 (16 mega-pixels).
|
||||
* @property {IL10n} l10n - Localization service.
|
||||
*/
|
||||
|
||||
|
@ -114,6 +117,7 @@ class BaseViewer {
|
|||
this.enablePrintAutoRotate = options.enablePrintAutoRotate || false;
|
||||
this.renderer = options.renderer || RendererType.CANVAS;
|
||||
this.useOnlyCssZoom = options.useOnlyCssZoom || false;
|
||||
this.maxCanvasPixels = options.maxCanvasPixels;
|
||||
this.l10n = options.l10n || NullL10n;
|
||||
|
||||
this.defaultRenderingQueue = !options.renderingQueue;
|
||||
|
@ -381,6 +385,7 @@ class BaseViewer {
|
|||
renderInteractiveForms: this.renderInteractiveForms,
|
||||
renderer: this.renderer,
|
||||
useOnlyCssZoom: this.useOnlyCssZoom,
|
||||
maxCanvasPixels: this.maxCanvasPixels,
|
||||
l10n: this.l10n,
|
||||
});
|
||||
bindOnAfterAndBeforeDraw(pageView);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue