libreoffice-tool

1.0.1 • Public • Published

libreoffice-tool

libreoffice工具

EXAMPLE

const Office = require('libreoffice-tool');
const office = new Office({
    libreofficePath: '', // 可选
});

(async function() {
    try {
        /**
        *  convert
        *  @param {string} inputPath 输入文件路径
        *  @param {string} type 需要转换完成的文件格式
        *  @param {string} newPath 输出文件路径,可选,默认为系统临时文件夹
        *  @returns {libreInfo, file}
        *    - libreInfo 转换信息
        *    - file 转换完成的文件名称
        **/
        const pdfDoc = await office.convert('./Gyb9LHYDAA.doc', 'pdf', './');
    }catch(err) {
        console.log(err);
    }
})();

/libreoffice-tool/

    Package Sidebar

    Install

    npm i libreoffice-tool

    Weekly Downloads

    0

    Version

    1.0.1

    License

    MIT

    Unpacked Size

    3.2 kB

    Total Files

    3

    Last publish

    Collaborators

    • xwb