<html>
  <head>

    <meta http-equiv="content-type" content="text/html; charset=windows-1252">
  </head>
  <body text="#000000" bgcolor="#FFFFFF">
    <p><font face="Arial, Helvetica, sans-serif">Hi Phil.</font></p>
    <p><font face="Arial, Helvetica, sans-serif">Please check the
        following:</font></p>
    <p><font face="Arial, Helvetica, sans-serif"><br>
      </font></p>
    <p><font face="Arial, Helvetica, sans-serif">-----8<-----<br>
      </font></p>
    <p>from PyQt5 import QtWidgets, QtWebEngineWidgets, QtPrintSupport<br>
      <br>
      <br>
      def cleanup():<br>
          pass<br>
      <br>
      <br>
      def print_page():<br>
          dialog = QtPrintSupport.QPrintDialog(w)<br>
          if dialog.exec_() == QtPrintSupport.QPrintDialog.Accepted:<br>
              page.print(dialog.printer(), cleanup)<br>
      <br>
      app = QtWidgets.QApplication([])<br>
      <br>
      html = "<html><body>Hello
      world</body></html>"<br>
      page = QtWebEngineWidgets.QWebEnginePage()<br>
      page.setHtml(html)<br>
      <br>
      w = QtWidgets.QPushButton("Print")<br>
      w.clicked.connect(print_page)<br>
      w.show()<br>
      <br>
      app.exec_()<br>
    </p>
    <p><br>
    </p>
    <p><font face="Arial, Helvetica, sans-serif">-----8<-----</font></p>
    <p><font face="Arial, Helvetica, sans-serif">It results in the
        following, both in PyQt 5.12.1 from wheel and 5.10.1 from Ubuntu
        repos:<br>
      </font></p>
    <p><br>
    </p>
    <p>Received signal 11 SEGV_MAPERR 000000000040<br>
      #0 0x7f191d6db8bf <unknown><br>
      #1 0x7f191d6dbcbb <unknown><br>
      #2 0x7f191d6dc33e <unknown><br>
      #3 0x7f192b1e6f20 <unknown><br>
      #4 0x7f191aad9ba3 QPrinter::pageRect()<br>
      #5 0x7f19228694ad printPdfDataOnPrinter()<br>
      #6 0x7f1922869946 QWebEnginePagePrivate::didPrintPage()<br>
      #7 0x7f191bc0bf09 <unknown><br>
      #8 0x7f191d63e247 <unknown><br>
      #9 0x7f191d664b67 <unknown><br>
      #10 0x7f191d6651cd <unknown><br>
      #11 0x7f191d66549a <unknown><br>
      #12 0x7f191bb9deaf <unknown><br>
      #13 0x7f192819489b QObject::event()<br>
      #14 0x7f192900f6fc QApplicationPrivate::notify_helper()<br>
      #15 0x7f19290167f0 QApplication::notify()<br>
      #16 0x7f1929a69f5e sipQApplication::notify()<br>
      #17 0x7f1928167e98 QCoreApplication::notifyInternal2()<br>
      #18 0x7f192816a937 QCoreApplicationPrivate::sendPostedEvents()<br>
      #19 0x7f19281bfc93 postEventSourceDispatch()<br>
      #20 0x7f1924fc8387 g_main_context_dispatch<br>
      #21 0x7f1924fc85c0 <unknown><br>
      #22 0x7f1924fc864c g_main_context_iteration<br>
      #23 0x7f19281bf2cf QEventDispatcherGlib::processEvents()<br>
      #24 0x7f19281667fa QEventLoop::exec()<br>
      #25 0x7f192816f270 QCoreApplication::exec()<br>
      #26 0x7f19298f5480 meth_QApplication_exec_<br>
      #27 0x000000502d6f <unknown><br>
      #28 0x000000506859 _PyEval_EvalFrameDefault<br>
      #29 0x000000504c28 <unknown><br>
      #30 0x000000506393 PyEval_EvalCode<br>
      #31 0x000000634d52 <unknown><br>
      #32 0x000000634e0a PyRun_FileExFlags<br>
      #33 0x0000006385c8 PyRun_SimpleFileExFlags<br>
      #34 0x00000063915a Py_Main<br>
      #35 0x0000004a6f10 main<br>
      #36 0x7f192b1c9b97 __libc_start_main<br>
      #37 0x0000005afa0a _start<br>
        r8: 3c0a6a626f203020  r9: 6f74616572432f3c r10: 6d6f726843282072
      r11: 72502f0a296d7569<br>
       r12: 00000000023f3d80 r13: 00007ffcd6fb5110 r14: 00007f1922869920
      r15: 00007f19226f2e70<br>
        di: 00000000023f3d80  si: 00000000023f3d80  bp:
      00007ffcd6fb5140  bx: 00007ffcd6fb4f90<br>
        dx: 0000000000000009  ax: 0000000000000030  cx:
      282072656375646f  sp: 00007ffcd6fb4f80<br>
        ip: 00007f191aad9ba3 efl: 0000000000010202 cgf: 002b000000000033
      erf: 0000000000000004<br>
       trp: 000000000000000e msk: 0000000000000000 cr2: 0000000000000040<br>
      [end of stack trace]<br>
      Calling _exit(1). Core file will not be generated.<br>
    </p>
    <p><br>
    </p>
    <p>Greetings.</p>
    <p>Julio.</p>
    <p><br>
    </p>
  </body>
</html>