Global

Methods

(async) WDocx2html(fpIn, fpOut, optopt) → {Promise}

Description:
  • 依照指定字串分割Docx檔

Source:
Example
import w from 'wsemi'
import WDocx2html from './src/WDocx2html.mjs'
//import WDocx2html from 'w-docx2html/src/WDocx2html.mjs'
//import WDocx2html from 'w-docx2html'

async function test() {

    let fpIn = `./test/docin.docx`
    let fpOut = `./test/docout.html`
    let opt = {
        execFontGrow: 1,
    }

    let r = await WDocx2html(fpIn, fpOut, opt)
    console.log(r)
    // => ok

    w.fsDeleteFile(fpOut)

}
test()
    .catch((err) => {
        console.log('catch', err)
    })
Parameters:
Name Type Attributes Default Description
fpIn String

輸入來源Html檔位置字串

fpOut String

輸入轉出Docx檔位置字串

opt Object <optional>
{}

輸入設定物件,預設{}

Properties
Name Type Attributes Default Description
execFontGrow Integer <optional>
0

輸入全文件放大字型次數整數,預設0

Returns:

回傳Promise,resolve回傳成功訊息,reject回傳錯誤訊息

Type
Promise