This script, originally created on April 29, 2015, addressed a different behavior of LibreOffice
installation on macOS at that time. However, it is now outdated and no longer relevant. Please refer to the latest comments for updated information, as much has changed over the past 8–9 years.
sudo curl https://gist.githubusercontent.com/pankaj28843/3ad78df6290b5ba931c1/raw/soffice.sh > /usr/local/bin/soffice && sudo chmod +x /usr/local/bin/soffice
#!/bin/bash
# This workaround is necessary because a symlink won't work.
# It may complain about missing .plist files.
/Applications/LibreOffice.app/Contents/MacOS/soffice "$@"
sudo chmod +x /usr/local/bin/soffice
soffice --headless --convert-to pdf:"calc_pdf_Export" /path/to/some/file.xlsx
This version clarifies the instructions and ensures proper grammar.
I’ve updated the README to note the deprecation of this script. It was created years ago to assist a colleague using macOS while the rest of the team worked on Linux at a fast-paced startup.