Earlier quoted context omitted.
Just like Macromedia Fireworks in 1998!
I have glorious memories of using Macromedia Fireworks at that time. I was 13 years old in 1998. I wish I had a better idea of why I loved it so much but I don’t recall what was different between it and Photoshop.
Truly Headless Draw.io Exports
11–20 of 26 posts
Re: Truly Headless Draw.io Exports
#12Drawio is great, I particularly love how you can export a png and include the drawio source embedded in the png.
- there is an electron version but also a web version which almost works as well which can be great in environments where downloading an electron app is hard.
- many enterprises with Confluence have a plugin in Confluence for embedding drawio.
- embedding the source in .png etc.
- support for UML shapes without forcing me to obey all the rules allowing for quick and dirty sketches.
- quick to use, decent usability.
- acceptable learning curve so I feel ok recommending it to others.
Re: Truly Headless Draw.io Exports
#13Re: Truly Headless Draw.io Exports
#14The first SVG export's problem was just that it had a transparent background. Chrome's default background is white, and so it draws the transparency on top of white, which is why the SVG looks fine in Chrome. Eye of Gnome displays transparency as a checkboard pattern, just like Gimp, Photoshop and many other image editors.
Re: Truly Headless Draw.io Exports
#15Drawio is great, I particularly love how you can export a png and include the drawio source embedded in the png.
I has become my go-to tool for many reasons. - there is an electron version but also a web version which almost works as well which can be great in environments where downloading an electron app is hard. - many enterprises with Confluence have a plugin in Confluence for embedding drawio. - embedding the source in .png etc. - support for UML shapes without forcing me to obey all the rules allowing for quick and dirty…
[1] https://marketplace.visualstudio.com/items?itemName=hediet.v...
Re: Truly Headless Draw.io Exports
#16Earlier quoted context omitted.
I has become my go-to tool for many reasons. - there is an electron version but also a web version which almost works as well which can be great in environments where downloading an electron app is hard. - many enterprises with Confluence have a plugin in Confluence for embedding drawio. - embedding the source in .png etc. - support for UML shapes without forcing me to obey all the rules allowing for quick and dirty…
There is also a convenient (unofficial) vscode extension [1] for people who don't want to install yet another electron app but already have vscode. It is able to open & edit local files without going through the upload/download dance. [1] https://marketplace.visualstudio.com/items?itemName=hediet.v...
Re: Truly Headless Draw.io Exports
#17There's also various docker images [2] including one for the image generations.
[1] https://github.com/jgraph/draw-image-export2 [2] https://github.com/jgraph/docker-drawio
Re: Truly Headless Draw.io Exports
#18The headless hacking isn't needed, there's a headless chrome/puppeteer PDF generation [1], it what we use for PDF generation at app.diagrams.net. There's also various docker images [2] including one for the image generations. [1] https://github.com/jgraph/draw-image-export2 [2] https://github.com/jgraph/docker-drawio
Edit: I'd also like to point out that depending on Chrome just to support headless exports seems a bit much, but I've also got 32GB of ram to spare, so I might be fine.
Re: Truly Headless Draw.io Exports
#19The headless hacking isn't needed, there's a headless chrome/puppeteer PDF generation [1], it what we use for PDF generation at app.diagrams.net. There's also various docker images [2] including one for the image generations. [1] https://github.com/jgraph/draw-image-export2 [2] https://github.com/jgraph/docker-drawio
I've found both of these before attempting any of this (I think you linked them to me on Twitter?), but was happy with neither of them: the point was to not depend on Docker, or Node, or have a solution that's Linux-only.
My solution integrates well with the rest of the pipeline that's all-Rust, and it works at least on Linux and Windows (macOS would probably be easy to support as well but I don't use it currently). It's very similar to `draw-image-export2` in spirit.
In my solution I made sure to ship a font I always use in diagrams (Iosevka) as a webfont, so I don't have to rely on fontconfig to find it - I'm not sure how that would work with either of the readily available solutions. And finally, I've left as a next step but: I am planning on keeping a Chrome instance running in the background (and an http server), and re-use it so there's less setup/teardown for each export.
Re: Truly Headless Draw.io Exports
#20The first SVG export's problem was just that it had a transparent background. Chrome's default background is white, and so it draws the transparency on top of white, which is why the SVG looks fine in Chrome. Eye of Gnome displays transparency as a checkboard pattern, just like Gimp, Photoshop and many other image editors.
The fonts are the primary issue - as the author elaborates a few lines below.