SebastiaanKlippert / go-wkhtmltopdf

Golang commandline wrapper for wkhtmltopdf
MIT License
1.05k stars 144 forks source link

wkhtmltopdf 0.12.6 support #53

Closed Liu-Chunhui closed 4 years ago

Liu-Chunhui commented 4 years ago

Context: Version 0.12.6 has been released on June 11, 2020. And one of changes is to disable local file access by default now.

More details can be find here: https://stackoverflow.com/questions/62315246/wkhtmltopdf-0-12-6-warning-blocked-access-to-file

Issue: it seems like the latest release is out of date (03/09/2019) and is not supporting 0.12.6. Could you please confirm this problem?

SebastiaanKlippert commented 4 years ago

Thanks for letting me know.

I did some testing with 0.12.6 but not a lot. The enable-local-file-access option is not implemented in my wrapper yet, I will add it asap and update the tests and CI.

But for now: the allow option is available, so that should work with 0.12.6. On the Page you can set page.Allow.Set("/usr/local/html") for example. Let me know if that works for you, if not I need to look into it.

SebastiaanKlippert commented 4 years ago

Just released a new version https://github.com/SebastiaanKlippert/go-wkhtmltopdf/releases/tag/v1.6.0 Let me know if that does not solve your issue.