w-html2docx
v1.0.5
Published
A tool for docx2pdf.
Downloads
15
Maintainers
Readme
w-html2docx
A tool for docx2pdf.
w-html2docx w-html2docx WHtml2docx WHtml2docx
Documentation
To view documentation or get support, visit docs.
Core
w-html2docxis based on thewin32cominpython, and only run inWindows.
Installation
Using npm(ES6 module):
npm i w-html2docxExample:
Link: [dev source code]
import w from 'wsemi'
import WHtml2docx from './src/WHtml2docx.mjs'
//import WHtml2docx from 'w-html2docx/src/WHtml2docx.mjs'
//import WHtml2docx from 'w-html2docx'
async function test() {
let fpIn = `./test/ztmp.html`
let fpOut = `./test/ztmp.docx`
let opt = {
imgRatioWidthMax: 0.5,
}
let r = await WHtml2docx(fpIn, fpOut, opt)
console.log(r)
// => ok
w.fsDeleteFile(fpOut)
}
test()
.catch((err) => {
console.log('catch', err)
})