htmltopdf 源码
使用AWS Lambda函数和无服务器层HTML转PDF 用于将html转换为pdf 先决条件 全局安装无服务器 npm i -g serverless 入门 安装所有依赖项 cd path/to/the/repo npm install 在本地运行 cd htmlToPdf/ sls offline start 确保将以下行注释为在本地运行 htmlToPdf / handler . js pdf . create ( html , { format : "Letter" , orientation : "portrait" , // phantomPath: '/opt/phantomjs_linux-x86_64' } ) . toBuffer ( ( err , buffer ) => { if ( err ) { reject
下载地址
用户评论