Node.js Tutorial to Convert Word DOCX to PDF Documents Using docx-pdf Library in Javascript Full Project For Beginners

 

 

npm i docx-pdf

 

 

Docx to pdf

 

 

A library that converts docx file to pdf.

 

 

Usage

 

 

index.js

 

 

var docxConverter = require('docx-pdf');

docxConverter('./input.docx','./output.pdf',function(err,result){
  if(err){
    console.log(err);
  }
  console.log('result'+result);
});

its basically docxConverter(inputPath,outPath,function(err,result){
  if(err){
    console.log(err);
  }
  console.log('result'+result);
});

Leave a Reply