dittodhole/dotnet-Svg.Contrib.Render

Javascript port

Zireael opened this issue · 1 comments

Hi, thanks for the converter.
Would it be possible to use this library in JavaScript? I'd like to do label generation in a HTML page and send them over as vector (ZPL commands) rather than raster (base64 encoded PNG/BMP/JPG).

I know rewrite to JS would be a lot to ask, but I was wondering if it's possible to use svg-render with a .dot-JS wrapper, something like
https://dotnetbrowser.support.teamdev.com/support/solutions/articles/9000109869-calling-net-from-javascript
I'd appreciate for an example snippet.
Thanks!

Hi and thanks for your thoughts and feedback!

The central logic of matrix calculation and command-generation can be implemented in any language, capable of such calculations (ie every language).

The main challenge of a port is the generation of .tcx-files (ie converting embedded images to a compatible format), which is solved via ImageMagick - I have no knowledge of an existing port to javascript. Additionally, I do not believe that this can be solved with a JS-wrapper (correct me!) 🤔

Anyway, I am happy with this feature request, but I'll need some time.
If you implement a port yourself, feel free to PR or add an external resource here.

Best
Andreas