实现非阻塞html转成pdf

1、通过 https://github.com/juce/lua-resty-shell 添加lublibs,并安装sockproc

2、安装phantomjs

3、配置见附件

4、页面调用

http://127.0.0.1/html2pdf?u=www.baidu.com&filename=测试.pdf

u指向要生成的pdf的动态或者静态地址

猜你喜欢

转载自yunlong167167.iteye.com/blog/2306939