I am creating a PDF file from QWebView.
class myView: public QWebView { }
One of the member functions has:
this->settings()->setAttribute(QWebSettings::PrintElementBackgrounds, true); QPrinter printer; printer.setOutputFormat(QPrinter::PdfFormat); printer.setResolution(QPrinter::HighResolution); printer.setOutputFileName("whoami.pdf"); print(&printer);
I see that the pdf file is generated, but in the html file there are several images that are not entering the pdf, it is empty.
Surfing the net did not help, and I also included WebSetting, for example:
this->settings()->setAttribute(QWebSettings::PrintElementBackgrounds, true);
Can someone kindly suggest that I am missing?
source share