Remove the compatibility checks in WorkerMessageHandler.createDocumentHandler

For some time these checks have only targeted Node.js environments, since the features in question exist in all supported browsers (even when a `legacy`-build is used).

Now that we've updated the minimum supported Node.js version to 18, a number of polyfills are thus (finally) no longer necessary in that environment. Hence for certain *basic* functionality, such as e.g. text-extraction, it's now possible to use either a modern- or a `legacy`-build of the PDF.js library in Node.js environments.

*Please note:* For e.g. canvas-rendering in Node.js environments it's still necessary to use a `legacy`-build, since that functionality requires various polyfills.
This commit is contained in:
Jonas Jenwald 2023-04-14 21:32:09 +02:00
parent ed8be6f882
commit 1753e321cd
2 changed files with 0 additions and 16 deletions

View file

@ -2165,8 +2165,6 @@ function packageJson() {
license: DIST_LICENSE,
optionalDependencies: {
canvas: "^2.11.2",
},
dependencies: {
"path2d-polyfill": "^2.0.1",
},
browser: {