Is there any way to render HTML/SVG to printer, PDF, and raster images with QtWebEngine?
We want to switch from WebKit to WebEngine, so using WebKit's QWebView is not an option anymore.
Is there any way to render HTML/SVG to printer, PDF, and raster images with QtWebEngine?
We want to switch from WebKit to WebEngine, so using WebKit's QWebView is not an option anymore.
It is announced that Qt Web Engine will support printing to PDF in Qt 5.7 which is in beta now.
Two overloads of printToPdf() function were added in Qt 5.7 for QWebEnginePage class.
We have example how to use these new functions in our company blog.
You can look for some already available Qt Web Engine printing options also here:
QWebEngine: print a page?
It took a bit of tinkering to get printing callable from a worker-thread: