antialize/wkhtmltopdf — pull request #20 by KJTsanaktsidis (2013-04-14 03:51:13+00:00)
Title: Add support for "Effective Url's" for resolving relative paths to CSS/JS/etc files

At the moment, when a HTML string is supplied directly to libwkhtmltopdf,
be that via an API call or via the - command line option to wkhtmltopdf,
relative URL's contained in the HTML are not resolved.

This change adds a field onto LoadSettings, effectiveUrl, that allows the
user to specify a URL, relative to which CSS/JS/etc link in the page will
be resolved. This is achieved by using the call
webPage.mainFrame()->setHtml() instead of ->load(), and supplying the
second argument as this effectiveUrl parameter passed down into
ResourceObject::load().