oc

office-convert

Wrapper for converting documents with unoconv. convert office document to other file type or html.

Showing:

Popularity

Downloads/wk

0

GitHub Stars

5

Maintenance

Last Commit

4yrs ago

Contributors

0

Package

Dependencies

0

License

ISC

Type Definitions

Tree-Shakeable

No?

Categories

Readme

OFFICE-CONVERTER

NPM version

use this module, you should confirm LibreOffice and Unoconv installed in your machine.

install LibreOffice

  • on OS X down dmg file from link

  • CentOS / RedHat

    CentOS and RedHat 7.2 自带 OpenOffice 4.3,如果想获得更好的体验,建议更换成LibreOffice,首先要卸载OpenOffice

    yum remove openoffice* libreoffice*
    

    从 RPM packages 安装LibreOffice

    wget http://download.documentfoundation.org/libreoffice/stable/5.2.5/rpm/x86_64/LibreOffice_5.2.5_Linux_x86-64_rpm.tar.gz
    
    tar -xvf LibreOffice_5.2.5_Linux_x86-64_rpm.tar.gz
    
    cd LibreOffice_5.2.5.x_Linux_x86-64_rpm/RPMS/
    
    yum localinstall *.rpm
    
    libreoffice5.2
    

install unoconv

  • on OS X

    通过 Homebrew 安装

    brew install unoconv
    brew install ghostscript
    
  • CentOS / RedHat

    从 github 下载程序包

    git clone https://github.com/dagwieers/unoconv.git
    
    # copy
    cp unoconv/unoconv /usr/bin
    # or link unoconv to /usr/bin
    ln -s unoconv/unoconv /usr/bin/unoconv
    

warning

unoconv start need use port 2002, so if want register unoconv as a service, should check port usage first.

Usage

var converter = require('office-convert').createConveter();
converter.generate(originFilePath, outputFileType, ouputFilePath).then(console.log).catch(console.error);

if use this module to converting documents, you can start a unoconv listener first

var converter = require('office-convert').createConveter({listener: true});

or

var converter = require('office-convert').createConveter();
converter.listen();

Rate & Review

Great Documentation0
Easy to Use0
Performant0
Highly Customizable0
Bleeding Edge0
Responsive Maintainers0
Poor Documentation0
Hard to Use0
Slow0
Buggy0
Abandoned0
Unwelcoming Community0
100
No reviews found
Be the first to rate

Alternatives

No alternatives found

Tutorials

No tutorials found
Add a tutorial