wkhtmltopdf seg fault

Working with wkhtmltopdf to create a pdf from html is pretty awesome and useful. Although I did have a little trouble with wkhtmltopdf crashing out with a seg fault occasionally.

The seg fault occured on the 'counting pages step 2/6' part of the conversion. After trying a couple of different things, including:

  • Changing the body text size of my document to  9.8px from 10px
  • Adding '--disable-smart-shrinking' to the command line
  • Checking the html wasn't malformed

I removed an image from the html that was on an external server, and bingo, it worked again.

More Articles ...