Nodejs 中将html转换成pdf文件,Nodejs Convert html into pdf 1. 下载phantomjs.exe,将该文件放在根目录 2. 编写pdf.js文件(在github上下载phantomjs相关的测试文件,仿照rasterize.js文件编写pdf.js文件) 3. Nodejs调用phantomjs,将html页面转换成pdf文件 // 改变存放html和pdf的路径 app.get('/pdf5',function(request,response){ v…