WIP: Add SVG renderer
I am trying to integrate the SVG renderer (unfortunately not the main focus of the pdfjs team - there might be rendering bugs), which could lead to increased performance and possibly a lower memory usage. Zooming should also work properly which could be an important improvement to users using community-solutions on mobile devices. I will eventually try to merge canvas renderer and SVG renderer into one so that we don't have code duplication. It also introduces a react based text layer renderer that could also be used in combination with the canvas renderer which currently creates text elements on width change which can be replaced by a transform style. We could also try to render to SVG on the server - using some optimizations in an experiment I got the total SVG file size to around 1.5x the PDF size. This would however mean that we don't need to load pdfjs in the client.
I think we could add the svg renderer as a beta feature initially / test it extensively and add an option to enable it later.