Printing a QWebPage to PDF
-
Is it possible to print a web page (via QPrinter) as one long PDF (i.e. without pagination)? I don't see a way to do this currently. I've tried setting different page sizes and even custom paper sizes and nothing seems to work. Here's what I'm currently trying (where
mPage
is aQWebPage
):@ QPrinter printer(QPrinter::HighResolution);
printer.setPaperSize(QSizeF(750, 100000), QPrinter::DevicePixel);
printer.setOutputFormat(QPrinter::PdfFormat);
printer.setFullPage(true);
printer.setOutputFileName(mFilename);mPage.mainFrame()->print(&printer);@
Any ideas?