Added support for printing multiple pages

If the generated HTML results in an image too big for one page, the
content is split across multiple pages.