1
0
Fork 0
mirror of https://github.com/mozilla/pdf.js.git synced 2025-04-25 01:28:06 +02:00
pdf.js/examples
Jonas Jenwald 86f943ca03 [api-minor] Replace the canvas package with @napi-rs/canvas
The `@napi-rs/canvas` package has fewer dependencies, which should *hopefully* make installing and using it easier for `pdfjs-dist` end-users. (Over the years we've seen, repeatedly, that `canvas` can be difficult to install successfully.)
Furthermore, this package includes more functionality (such as `Path2D`) which reduces the overall number of dependencies in the PDF.js project.

One point to note is that `@napi-rs/canvas` is a fair bit newer than `canvas`, and has a lot fewer users, however looking at the commit history it does seem to be actively maintained.

Note that I've successfully tested the [Node.js examples](https://github.com/mozilla/pdf.js/tree/master/examples/node), in particular the `pdf2png` one, with this patch applied and things appear to work fine.

Please see:
 - https://www.npmjs.com/package/@napi-rs/canvas
 - https://github.com/Brooooooklyn/canvas
2024-11-09 18:51:29 +01:00
..
components Update the examples/-folder to account for outputting of JavaScript modules (PR 17055 follow-up) 2023-10-28 10:26:25 +02:00
image_decoders Update the examples/-folder to account for outputting of JavaScript modules (PR 17055 follow-up) 2023-10-28 10:26:25 +02:00
learning Give all HTML button elements a type 2024-07-30 18:49:18 +02:00
mobile-viewer Give all HTML button elements a type 2024-07-30 18:49:18 +02:00
node [api-minor] Replace the canvas package with @napi-rs/canvas 2024-11-09 18:51:29 +01:00
text-only Update the examples/-folder to account for outputting of JavaScript modules (PR 17055 follow-up) 2023-10-28 10:26:25 +02:00
webpack Fix examples/webpack/README.md. The .mjs extension is necessary. Close #17319 2023-11-23 09:25:20 +09:00
.eslintrc Enable the ESLint no-var rule globally 2021-03-13 16:12:53 +01:00