Blazor.Diagrams
Blazor.Diagrams copied to clipboard
[Question] Screenshots
Hi @zHaytam
thanks for this library!! I am right now playing with the idea of using it but have some questions on it
- Is there a way that I can produce a screenshot of the diagram (for example exporting the diagram into a word document)? My initial research indicates that a non-canvas library like this would have some problems with it. Even more when I interpret the Virtualization feature the right way.
- Is it possible to use the library 100% SVG style? like that I could export the SVG and work with that to create my png (or even svg ;)).
- Is there a hypothetical way that I could run the library to non-ui way to create the SVG? Like the Blazor is soon also able to SSR components (and not only for SSR but also email templates etc).
Thanks a lot!!!
Hello !
- It's a bit tricky to do, but I know some people that managed to do it with html2canvas
- I believe so. As far as I know, everything is supported when using the SVG equivalents
- Not really, as the styling is handled by the browser (SVG / CSS), the library doesn't know how to render stuff
This library is more meant to be used interactively, using it in a non-ui way would be a bit overkill to be honest.
Thanks for the response. I can follow the thought of being focussed on interactivity. I can see use cases for rendering diagrams read-only or use server side rendering (the new blazor mode) to just display them. And this SSR mode would also enable to render html for emails and so on. Valuable I think.
I would love to support more read-only scenarios, to be honest, a.k.a remove interactivity events, etc so that it's very fast.
But for no-ui at all, that's a bit hard.
What is this new SSR mode? I thought Blazor already had SSR
It is true server side rendering (as in razor pages, PHP, asp). The blazor style components can now be serialized to Html file/stream to my limited understanding. Asp.net core razor pages and razor views have never unified their component model, so I think they shoot to end that
I'll have to look more into that. I never really tried this library with SSR, I'll research more and see what needs to be done!