wkhtmltopdf, 0.12.6, Warning: Blocked access to file

前端 未结 5 854
耶瑟儿~
耶瑟儿~ 2020-12-20 11:02

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

    Warning: Blocked acc         


        
5条回答
  •  难免孤独
    2020-12-20 11:54

    Just bumping this thread with a correction in case you're still getting the same error in spite of using:

    --enable-local-file-access
    

    For some reason, this cmd line argument does not work when being specified after input/output files, you have to write this argument right after wkhtmltopdf.exe.

    So

    wkhtmltopdf.exe --enable-local-file-access input.html output.pdf
    

    instead of other variants.

提交回复
热议问题