Search code examples
javascriptdjangowebkitwkhtmltopdf

Testing a page against webkit rendering engine in headless mode


I am trying to use django-wkhtmltopdf wrapper for wkhtmltopdf executable which uses webkit rendering engine to convert html pages to pdf. However I developed my pages wrt chrome/firefox, and they have dynamically generated data and javascript. Some of the javascript used is not being supported by webkit, and process dies silently. So, the pdf page that I get is incomplete and I cannot pinpoint where exactly the problem is. What can I do?

Note: I am developing in Windows and using Vagrant to run development environment on Ubuntu 15.


Solution

  • wkhtmltopdf has a --debug-javascript option.