office-converter

1.0.2 • Public • Published

office-converter

A node module to convert office documents into either PDF or HTML.

It requires requires unoconv to be installed and in the PATH. It can convert any office document (doc/docx/xls/xlsx/ppt/pptx) which can be opened in Open Office [Or Libre Office] to either PDF or HTML.

Usage

var converter = require('office-converter')();
  converter.generatePdf('input/test.xls', function(err, result) {
    // Process result if no error
    if (result.status === 0) {
      console.log('Output File located at ' + result.outputFile);
    }
  });
  converter.generateHtml('input/test.docx', function(err, result) {
    // Process result if no error
    if (result.status === 0) {
      console.log('Output File located at ' + result.outputFile);
    }
  });
  

How to test?

There are test cases inside tests folder. You can test using npm test to test the package. Tests result in test.pdf inside input folder.

Versions

Current Tags

  • Version
    Downloads (Last 7 Days)
    • Tag
  • 1.0.2
    293
    • latest

Version History

  • Version
    Downloads (Last 7 Days)
    • Published
  • 1.0.2
    293
  • 1.0.1
    1
  • 1.0.0
    1

Package Sidebar

Install

npm i office-converter

Weekly Downloads

295

Version

1.0.2

License

MIT

Last publish

Collaborators

  • vworld4u