wkhtmltopdf, 0.12.6, Warning: Blocked access to file

て烟熏妆下的殇ゞ 提交于 2020-08-07 07:11:27

问题


When upgrade wkhtmltopdf to 0.12.6, it came to such messages and the image did not show in the target pdf:

    Warning: Blocked access to file /path/to/bpa_product_layering.png

BTW, the same source html file works well with 0.12.5


回答1:


This is caused by the change of default behavior. wkhtmltopdf disables local file access by default now. It could be solved by adding the command line parameter

--enable-local-file-access

or the combination

--disable-local-file-access --allow <path>


来源:https://stackoverflow.com/questions/62315246/wkhtmltopdf-0-12-6-warning-blocked-access-to-file

标签
易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!