Canvas rendering vs images and DOM #203
JoackimPennerup
started this conversation in
Ideas
Replies: 0 comments
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
-
I've looked a Pdfjs, Nutrient and Apryse. All take slightly different approaches to rendering PDF content and handling text selections etc. Pdfjs uses a canvas with native browser test selections. Apryse uses one canvas for PDF content and one for selections and annotations. Nutrient seems to take an approach close to the one used by EmbedPDF.
I have a hunch that rendering to a canvas, will be more performant than overlaying images and updating images in the DOM. But this might have been considered by team already? My main concern is about really large PDFs, such as technical drawings or maps. They will require a lot of DOM just du be rendered. When a single canvas element could have been enough. The same canvas could be used for both lowres loading and tiled highres.
Would there be interest in a PoC for this?
Beta Was this translation helpful? Give feedback.
All reactions