Convert org file to odt with Emacs

Just as we can convert .org file to .pdf in Emacs, we can also convert .org files to .odt format(Libre Office)

org2odt

org to odt

Open up your Emacs config file and paste below code

(if (file-exists-p "/usr/bin/soffice")
  (setq org-export-odt-convert-processes
      "/usr/bin/soffice --headless --convert-to %f%x --outdir %d %i"
      org-export-odt-preferred-output-format "odt"
      org-export-odt-convert-process "/usr/bin/soffice")
(message "SOFFICE path not found"))

Now open any org file and type

M-x org-export-as-odt

This should convert an org file to odt.

Above code can also be downloaded from haqiba.org directly as emacs config file.

Standard

Leave a comment