mirror of
https://github.com/mozilla/pdf.js.git
synced 2025-04-26 01:58:06 +02:00
[api-minor] Make isOffscreenCanvasSupported
configurable via the API (issue 14952)
This patch first of all makes `isOffscreenCanvasSupported` configurable, defaulting to `true` in browsers and `false` in Node.js environments, with a new `getDocument` parameter. While you normally want to use this, in order to improve performance, it should still be possible for users to control it (similar to e.g. `isEvalSupported`). The specific problem, as reported in issue 14952, is that the SVG back-end doesn't support the new ImageMask data-format that's introduced in PR 14754. In particular: - When the SVG back-end is used in Node.js environments, this patch will "just work" without the user needing to make any code changes. - If the SVG back-end is used in browsers, this patch will require that `isOffscreenCanvasSupported: false` is added to the `getDocument`-call.
This commit is contained in:
parent
7d5f7a517c
commit
1ea4c4b519
6 changed files with 37 additions and 5 deletions
|
@ -410,6 +410,7 @@ class WorkerMessageHandler {
|
|||
disableFontFace: data.disableFontFace,
|
||||
ignoreErrors: data.ignoreErrors,
|
||||
isEvalSupported: data.isEvalSupported,
|
||||
isOffscreenCanvasSupported: data.isOffscreenCanvasSupported,
|
||||
fontExtraProperties: data.fontExtraProperties,
|
||||
useSystemFonts: data.useSystemFonts,
|
||||
cMapUrl: data.cMapUrl,
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue