Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

SVG output file is not portable #102

Open
crabtree opened this issue Oct 2, 2022 · 3 comments
Open

SVG output file is not portable #102

crabtree opened this issue Oct 2, 2022 · 3 comments

Comments

@crabtree
Copy link

crabtree commented Oct 2, 2022

I rendered the diagram using the SVG output. Unfortunately it references the png icons, so it will not display correctly without AzViz module installed. The possible solution to solve the problem, is to render the diagram using icons embedded using the base64 encoding. Unfortunately graphviz does not support base64 encoded images - I first tried such implementation which can be found here.
I finally managed to workaround the problem replacing the icons paths in the SVG file to its base64 encoded versions (the implementation). I can open the PR if you don't mind the workaround.

I think this also sorts out the problem described in #97

@zhangtbj
Copy link

Hi @PrateekKumarSingh ,

Glad to find this Azviz tool for our project, it is really helpful. But we found a limitation above ^^

Could you please help see if our proposal is good for Azviz?

Thanks!

@rebelinux
Copy link

rebelinux commented Oct 22, 2022

I rendered the diagram using the SVG output. Unfortunately it references the png icons, so it will not display correctly without AzViz module installed. The possible solution to solve the problem, is to render the diagram using icons embedded using the base64 encoding. Unfortunately graphviz does not support base64 encoded images - I first tried such implementation which can be found here. I finally managed to workaround the problem replacing the icons paths in the SVG file to its base64 encoded versions (the implementation). I can open the PR if you don't mind the workaround.

I think this also sorts out the problem described in #97

I applied this fix to my project and it worked like a charm! Thanks
https://github.com/rebelinux/Veeam.Diagrammer/blob/1b560cd052b78231c8c6f7c84e6a15446f0fe090/Src/Public/New-VeeamDiagram.ps1#L380

@zhangtbj
Copy link

Thanks rebelinux!

CC @crabtree ^^.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants