Ecosyste.ms: Awesome

An open API service indexing awesome lists of open source software.

Awesome Lists | Featured Topics | Projects

https://github.com/brrd/loconvert

Convert office documents in Node.js using LibreOffice
https://github.com/brrd/loconvert

convert converter document libreoffice soffice

Last synced: 5 days ago
JSON representation

Convert office documents in Node.js using LibreOffice

Awesome Lists containing this project

README

        

# loconvert

Convert office documents in Node.js using LibreOffice (soffice.exe).

LibreOffice must be installed.

This supports multliple documents conversion on Windows (see issue https://wiki.documentfoundation.org/Faq/General/150).

## Installation

```
npm install loconvert --save
```

## Usage

```javascript
const convert = require("loconvert");

// Convert a single document
convert({
input: "./test/src/test.docx",
format: "\"html:XHTML Writer File:UTF8\"",
outdir: "./test/out",
customPath: "optional/custom/path/to/libreoffice/directory"
})
.then(() => console.log("done"));

// Convert multiple documents
convert({
input: ["./test/src/test.docx", "./test/src/test2.docx"],
format: "\"html:XHTML Writer File:UTF8\"",
outdir: "./test/out"
})
.then(() => console.log("done"));
```