Skip to content

Supported conversions

The input format fixes the document family. convertTo() accepts only the output formats listed for that family and rejects every other combination before LibreOffice starts.

Complete input-to-output list

InputFamilySupported Format outputs
InputFormat::ODTWriterPDF, ODT, DOCX, RTF, TXT, HTML
InputFormat::DOCWriterPDF, ODT, DOCX, RTF, TXT, HTML
InputFormat::DOCXWriterPDF, ODT, DOCX, RTF, TXT, HTML
InputFormat::DOCMWriterPDF, ODT, DOCX, RTF, TXT, HTML
InputFormat::RTFWriterPDF, ODT, DOCX, RTF, TXT, HTML
InputFormat::TXTWriterPDF, ODT, DOCX, RTF, TXT, HTML
InputFormat::HTMLWriterPDF, ODT, DOCX, RTF, TXT, HTML
InputFormat::ODSCalcPDF, ODS, XLSX, CSV
InputFormat::XLSCalcPDF, ODS, XLSX, CSV
InputFormat::XLSXCalcPDF, ODS, XLSX, CSV
InputFormat::XLSMCalcPDF, ODS, XLSX, CSV
InputFormat::CSVCalcPDF, ODS, XLSX, CSV
InputFormat::ODPImpressPDF, ODP, PPTX
InputFormat::PPTImpressPDF, ODP, PPTX
InputFormat::PPTXImpressPDF, ODP, PPTX
InputFormat::PPTMImpressPDF, ODP, PPTX
InputFormat::ODGDrawPDF, ODG, PNG, JPEG, SVG, WEBP
InputFormat::PDFDrawPDF, ODG, PNG, JPEG, SVG, WEBP
InputFormat::DXFDrawPDF, ODG, PNG, JPEG, SVG, WEBP
InputFormat::SVGDrawPDF, ODG, PNG, JPEG, SVG, WEBP
InputFormat::PNGDrawPDF, ODG, PNG, JPEG, SVG, WEBP
InputFormat::JPEGDrawPDF, ODG, PNG, JPEG, SVG, WEBP
InputFormat::WEBPDrawPDF, ODG, PNG, JPEG, SVG, WEBP

Converting to the same format is allowed when it appears in the row. Input filename aliases .htm and .jpeg resolve to InputFormat::HTML and InputFormat::JPEG respectively.

Output filenames

FormatCanonical extensionAvailable from
PDF.pdfWriter, Calc, Impress, Draw
ODT.odtWriter
DOCX.docxWriter
RTF.rtfWriter
TXT.txtWriter
HTML.htmlWriter
ODS.odsCalc
XLSX.xlsxCalc
CSV.csvCalc
ODP.odpImpress
PPTX.pptxImpress
ODG.odgDraw
PNG.pngDraw
JPEG.jpgDraw
SVG.svgDraw
WEBP.webpDraw

The selected Format, not a caller-provided filename, controls the final extension.

Format-specific results

  • CSV output is UTF-8, comma-delimited, double-quoted, and contains the first worksheet.
  • TXT output is UTF-8.
  • HTML succeeds only when LibreOffice creates one HTML file. Referenced image sidecars make the conversion fail.
  • PNG, JPEG, SVG, and WebP produce one image using LibreOffice's normal export behavior. There is no page selector and no promise about which page a multi-page source supplies.
  • Convert a multi-page Draw or PDF source to PDF when every page must remain in one output.
  • PDF input belongs to the Draw family. Converting it does not perform OCR or reconstruct editable document structure.

Successful conversion means one non-empty, bounded artifact passed the package's format checks. It does not promise lossless conversion, visual fidelity, or Microsoft Office compatibility.

Last updated:

Released under the MIT License.