NodeJS office converter using LibreOffice or OpenOffice.
- Convert PDF, Office and many other files types
- Easily generate file thumbnails
- Callback and promise support
npm install --save node-office
// or
yarn add node-office
await office.convert('./test.doc', './test.pdf');
function callback() {
console.log('Done!');
}
office.convert('./test.doc', './test.pdf', callback);
Thumbnails can be generated by converting a file to an image format like JPEG or PNG.
await office.convert('./test.doc', './test.jpg');
await office.convert('./marketing.pdf', './marketing.jpg');
import office from 'node-office';
await office.convert('./test.doc', './test.pdf');
import { convert, listen } from 'node-office';
await convert('./test.doc', './test.pdf');
const office = require('node-office');
function cb() {
console.log('Conversion complete');
}
office.convert('./test.doc', './test.pdf', cb);
const convert = require('node-office').convert;
function cb() {
console.log('Conversion complete');
}
convert('./test.doc', './test.pdf', cb);