3 ms·
FWIW I just launched a web service API for doing that - https://documentalchemy.com/ https://documentalchemy.com/ If you're comfortable with an external API fo
by rodw 11y ago
FWIW I just launched a web service API for doing that - https://documentalchemy.com/ https://documentalchemy.com/
If you're comfortable with an external API for this, converting MS Office documents to PDF is as simple as:
curl -X POST --form "document=@$SOURCE" -H "Authorization: da.key=$API_KEY" https://documentalchemy.com/api/v1/document/-/rendition/pdf -o "$DEST"
You can test it directly online here - https://documentalchemy.com/demo https://documentalchemy.com/demo
If you're not comfortable with an external API for this, I think the conventional answer to your question is to use unoconv [1] which is simply a Python script that uses LibreOffice [2] or OpenOffice (formerly StarOffice) [3] to do the conversion.
[1] https://github.com/dagwieers/unoconv https://github.com/dagwieers/unoconv
[2] https://www.libreoffice.org/ https://www.libreoffice.org/
[3] http://www.openoffice.org/ http://www.openoffice.org/
You can also use Libre/OpenOffice directly for the conversion, but unoconv is geared toward having an always-on version of office running in the background that you use for the conversion, which is a significant performance boost relative to launching the app for every conversion.
unoconv is a little flaky, but works well in general (it's certainly a part of the DocumentAlchemy backend).