1
Kamitora 2019 年 1 月 4 日 via iPhone chrome 打开,右键,打印,导出 pdf
|
2
sethverlo 2019 年 1 月 4 日
wkhtmltopdf, pandoc, 还有个什么忘了,自己搜下吧,但是坑挺多的,不建议生产环境用,自己玩玩儿还是可以的
|
3
sethverlo 2019 年 1 月 4 日
哦对了你这个 X server 指的是 x11
|
4
vissssa 2019 年 1 月 4 日
|
5
binux 2019 年 1 月 4 日
You will need to run wkhtmltopdf within a "virtual" X server.
Go to the link below for more information https://github.com/JazzCore/python-pdfkit/wiki/Using-wkhtmltopdf-without-X-server |
6
kingwl 2019 年 1 月 4 日
|
7
519718366 2019 年 1 月 4 日
chrome 插件:Full Page Screen Capture
|
8
Aprilming 2019 年 1 月 4 日
你这个更新到最新的 wkhtmltopdf,好像就可以了,这个我之前用过,需要 X server,但是服务器没有 X server,需要安装其他包才能解决,上次看的时候最新的 wkhtmltopdf 貌似自带了。
|
9
yidinghe 2019 年 1 月 4 日 用 Chrome 的 headless 模式直接转换,无需 xserver
|
10
Aprilming 2019 年 1 月 4 日
这玩意在生产环境中,还是比较坑比的,自己玩玩就算了,主要是在服务器上转 pdf 的速度比较慢,还经常报错,还有文件名中文的问题,反正之前用的时候,坑的一批,最后为了解决慢的问题,还重构了代码,ps:在自己电脑转的时候不算慢,但是到了服务器上真的慢。主要还是 X server 的问题
|
11
devforma 2019 年 1 月 4 日
https://yq.aliyun.com/articles/601753
可以用阿里云函数计算搭一个服务 |
12
nogoodren 2019 年 1 月 4 日
试一试虚拟打印机
|
13
l0o0 2019 年 1 月 4 日
如果用 python 的话,推荐你试试这个 https://github.com/Kozea/WeasyPrint,我感觉比较不错,打印出来的效果比 wkhtmltopdf 好挺多的。而且开发还挺活跃,有问题直接提 issue
|
14
xjqaxl 2019 年 1 月 4 日
phantomjs
|
15
Ewig OP 已经解决,原因是版本太低,在外国论坛找了一个高版本的已经解决,谢谢诸位!
|