Code Yarns ‍👨‍💻
Tech BlogPersonal Blog

How to export Visio file to PDF using LibreOffice

📅 2019-Sep-05 ⬩ ✍️ Ashwin Nanjappa ⬩ 📚 Archive

Visio Viewer is a free tool from Microsoft that can be used to view Visio files (.vsd). However, it only works on Windows, that too inside Internet Explorer. And printing from it results in cropped and low-resolution export of the diagrams.

Thankfully, LibreOffice Draw can load Visio files. Double-clicking a .vsd file in Linux should automatically open it in LibreOffice Draw, assuming you have LibreOffice installed. You can now export it to PDF by using the Export feature in the File menu.

As a bonus, LibreOffice has a headless mode, where it can be invoked from the shell. Using this headless mode, we can export to PDF directly from the shell like this:

$ soffice --headless --convert-to pdf foobar.vsd

This writes to a PDF file of the same name in the same directory.

If you get a shared library file error, then fix it as described here.