Every time a PDF is created in WKHTMLTOPDF (using php) i am getting the following in the apache error log:
Loading pages (1/6)
[> ] 0%
[======> ] 10%
[==========> ] 17%
[===================> ] 32%
[==============================> ] 50%
[=====================================> ] 63%
[============================================> ] 74%
[============================================================] 100%
Counting pages (2/6)
[============================================================] Object 1 of 1
Resolving links (4/6)
[============================================================] Object 1 of 1
Loading headers and footers (5/6)
Printing pages (6/6)
[> ] Preparing
[============================================================] Page 1 of 1
Done
However the pdf is created without any errors, is there a way of stopping this as the error logs are getting very large and also masking genuine errors?
Thanks
To silence wkhtmltopdf specifically:
Use the --quiet
flag:
exec("wkhtmltoimage -q …");
And redirect stderr per 2>/dev/null
or similar shell features:
exec("wkhtmltopdf -q … 2>&1");
The latter works with most command-line tools, btw.
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.