- node.js installed
- clone the repo and run
npm install
- This project has a file
convertUsingDocPdf.js - It uses
docx-pdfnode module which generates 2 pdf pages which less control and no documentation of the module. - It internally uses
mammothnode module to html conversion and then usesphantom.jsnode module for html to pdf conversion
- This project has a file
convertUsingMammothPuppeeteer.js - It uses
mammothto convert docx to html and then usespuppeteerheadless chrome api to convert html to pdf - It has more control you can specify - number of pages, page size, background etc.