简体   繁体   中英

Laravel snappy returning Failed to load about:blank, with network status code 301 and http status code 0 - Protocol “about” is unknown Error

I am using laravel snappy based on wkhtmltopdf, everything was ok, but now on server and local I am getting this error:

Failed to load about:blank, with network status code 301 and http status code 0 - Protocol "about" is unknown Error. And

Blocked access to file /var/www/app/public/css/app.css

And no image is rendered in pdf.

This is so strange and discouraging to always being debugging snappy. I do not understand the issue and do not know how to fix it. anyone can help me please? thanks

With Laravel Snappy, you need to use this option

enable-local-file-access

like this:

->setOption('enable-local-file-access', true)

I also discover this link after: wkhtmltopdf, 0.12.6, Warning: Blocked access to file . It will help too.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM