fix crash when --header-html is specified

This was introduced in 80cbcc5, where the createPrinter() method
created the printer with an empty filename as output filename is
initialised in pagesLoaded() but it gets called prior to that.
This would result in a crash after the errors such as
    QWin32PrintEngine::initialize: OpenPrinter failed

Additionally, QPainter::begin() was not called for the printer
resulting in additional errors being printed.
Fix uninitialized toc variable
Merge pull request #33 from ashkulz/header-html-crash

fix crash when --header-html is specified