It's easy to print to a PDF file with Qt. I've used it with several components but not with webkit. But from what I look at the docs, it has a print function so you're good to go.
Just create a printer object and set it's format to PDF. Here's a code sample:
QWebView *webkit = new QWebView();
printer.setOutputFileName("cartao.pdf");
printer.
setOutputFormat(QPrinter::PdfFormat);
webkit
->load
(QUrl("http://www.qtcentre.org/forum/"));
webkit->print(&printer);
QWebView *webkit = new QWebView();
QPrinter printer(QPrinter::HighResolution);
printer.setPageSize(QPrinter::A4);
printer.setOutputFileName("cartao.pdf");
printer.setOutputFormat(QPrinter::PdfFormat);
webkit->load(QUrl("http://www.qtcentre.org/forum/"));
webkit->print(&printer);
To copy to clipboard, switch view to plain text mode
That should get you going.
Qt for multi-platform is very good. And for this task you need, it gets the job done easy.
Good luck!
Bookmarks