wkhtmltopdf - no pdf only error in log
I try to use wkhtmltopdf with drupal.
Via 开发者_开发技巧terminal I can make a pdf of a certain website. But if I try to make a pdf of my drupal content I got a page refesh an this error.. I'm wondering what this error means..
wkhtmltopdf: Loading pages (1/6) [> ] 0% [======> ] 10% [======> ] 11% Error: Authentication Required [============================================================] 100% Error: Failed loading page file:///tmp/wktemp-b02df673-db7f-4683-99ae-68ce16ec7ab6.html (sometimes it will work just to ignore this error with --load-error-handling ignore)
With wkhtmltopdf you can specify a user/pass to login to your Drupal website with:
--username <username>
HTTP Authentication username
--password <password>
HTTP Authentication password
Remember that wkhtmltopdf is running on the server and knows nothing of your desktop session user/pass details.
I ran into the same thing, & it was due to an htpasswd requirement for the site. You can just carve out that folder so it doesn't require a password, and it should work ok.
To debug, just look at the text of the original html file, and make sure all the links are accessible without any login.
精彩评论