1.0.1 • Published 5 years ago

nodejs-html-docx v1.0.1

Weekly downloads
7
License
ISC
Repository
github
Last release
5 years ago

nodejs-html-docx

nodejs-html-docx is a simple tool to create MS Word (.Docx) file with Header and Pagination in Footer. That too with Promise. Yayy!

Installation

npm i nodejs-html-docx

Usage

import {createDoc} from 'nodejs-html-docx'


// bodyMarkup - replaces the content in the body of the document
// headerTitle - Text you want to show in header. Usually a document title
// outputFile - Name you want for the output file

createDoc(bodyMarkup, {headerTitle: 'Report', outputFile: 'Report'}).then(path => {
    // you get the path for the generated file here
    console.log('Conversion complete at => ', path)
}).catch(err => {
    // You know this
	console.log(err)
})
1.0.1

5 years ago

1.0.0

5 years ago