1

I implement the ability to print reports in my project. Reports are presented as HTML content. I use for print QWebEnginePage. I need high resolution print output for reports:

QPrinter printer = new QPrinter(QPrinter::HighResolution);

But when printing with the "print" function, print fails, with message in debug:

QImage: out of memory, returning null image

When printing with ScreenResolution, everything is fine, but the result is poor quality. Version Qt - 5.10.1

soaup
  • 23
  • 4

1 Answers1

0

Probably you are indeed running out of memory. Try to convert your web page into something that renders better, e.g. PDF and print the PDF instead.

Jens
  • 6,173
  • 2
  • 24
  • 43