mirror of
https://github.com/mozilla/pdf.js.git
synced 2025-04-19 14:48:08 +02:00
Support the maxCanvasPixels
option in the thumbnails code
This addresses an inconsistency in the viewer, since the thumbnails don't respect the `maxCanvasPixels` option. Note that, as far as I know, this has not lead to any bugs since the thumbnails render with a fixed (and small) width, however it really cannot hurt to address this (especially after the introduction of the `maxCanvasDim` option). To support this a new `OutputScale`-method was added, to avoid having to duplicate code in multiple files.
This commit is contained in:
parent
1bc98dfbd9
commit
fc22d3afc7
5 changed files with 79 additions and 50 deletions
|
@ -478,6 +478,7 @@ const PDFViewerApplication = {
|
|||
: null;
|
||||
|
||||
const enableHWA = AppOptions.get("enableHWA"),
|
||||
maxCanvasPixels = AppOptions.get("maxCanvasPixels"),
|
||||
maxCanvasDim = AppOptions.get("maxCanvasDim");
|
||||
const pdfViewer = new PDFViewer({
|
||||
container,
|
||||
|
@ -506,7 +507,7 @@ const PDFViewerApplication = {
|
|||
),
|
||||
imageResourcesPath: AppOptions.get("imageResourcesPath"),
|
||||
enablePrintAutoRotate: AppOptions.get("enablePrintAutoRotate"),
|
||||
maxCanvasPixels: AppOptions.get("maxCanvasPixels"),
|
||||
maxCanvasPixels,
|
||||
maxCanvasDim,
|
||||
enableDetailCanvas: AppOptions.get("enableDetailCanvas"),
|
||||
enablePermissions: AppOptions.get("enablePermissions"),
|
||||
|
@ -529,6 +530,7 @@ const PDFViewerApplication = {
|
|||
eventBus,
|
||||
renderingQueue: pdfRenderingQueue,
|
||||
linkService: pdfLinkService,
|
||||
maxCanvasPixels,
|
||||
maxCanvasDim,
|
||||
pageColors,
|
||||
abortSignal,
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue