2 Using the extensions

2.3 Exporting from the command line

You can also use the extensions to export to LaTeX, XHTML or EPUB from the command line. For example to export to HTML5, use the command line

soffice --headless --convert-to html:org.openoffice.da.writer2xhtml5 document.odt

Note that this does not work if LO is already running.

The paramter is the file extension followed by a colon, followed by a filter name. The possible filter names are detailed in the table below.

If you are using LO version 4.3.2 or later, you can also pass options to the filter. For example to export to LaTeX with pdfTeX as the backend using latin1 as the input encoding, use the command line

soffice --headless --convert-to tex:org.openoffice.da.writer2latex:backend=pdftex,inputencoding=latin1 document.odt

The options must be supplied after an additional colon as a comma separated list. Each item should have the form name=value. See section 4 for information about the available options.

Format

FilterName

LaTeX

org.openoffice.da.writer2latex

BibTeX

org.openoffice.da.writer2bibtex

XHTML (text document)

org.openoffice.da.writer2xhtml

XHTML 1.1 (text document)

org.openoffice.da.writer2xhtml11

XHTML (spreadsheet)

org.openoffice.da.calc2xhtml

XHTML 1.1 (spreadsheet)

org.openoffice.da.calc2xhtml11

XHTML + MathML

org.openoffice.da.writer2xhtml.mathml

HTML5 (text document)

org.openoffice.da.writer2xhtml5

HTML5 (spreadsheet)

org.openoffice.da.calc2xhtml5

EPUB

org.openoffice.da.writer2xhtml.epub

EPUB 3

org.openoffice.da.writer2xhtml.epub3