💾 Archived View for republic.circumlunar.space › users › johngodlee › posts › 2020-07-22-drawio_late… captured on 2024-02-05 at 10:36:02. Gemini links have been rewritten to link to archived content
⬅️ Previous capture (2021-12-04)
-=-=-=-=-=-=-
DATE: 2020-07-22
AUTHOR: John L. Godlee
I discovered and tweaked a nifty one-liner which allows me to take .drawio files generated by Draw.io[1] and export them as clean vector-based .pdf files which I can then include in a LaTeX document:
#!/usr/bin/env sh find . -name *.drawio -exec rm -f ../img/{}.pdf \; -exec /Applications/draw.io.app/Contents/MacOS/./draw.io --crop -x -o ../img/{}.pdf {} \;
This finds all .drawio files in the current directory . and runs the draw.io executable on them to crop to the image and export as a .pdf to the directory where all my images are stored ../img/. \includegraphics{...} can then render the image in my LaTeX document. Note that this is on macOS, using the desktop version of draw.io, hence the funny executable.