Node.js Express to Convert HTML Template With CSS to PDF Documents Using html-pdf Library in Browser Using Javascript Full Project For Beginners

 

 

npm init -y

 

 

npm i express

 

 

npm i multer

 

 

npm i html-pdf

 

 

Usage

 

 

You can use this library on command line by installing this library globally as shown below

 

 

npm i -g html-pdf

 

 

html-pdf index.html output.pdf

 

 

 

index.html

 

 

 

 

Generated pdf will look like this as shown below

 

 

 

 

 

 

Express Web App

 

 

 

index.js

 

 

 

 

 

index.html

 

 

Leave a Reply