Example #1
0
 def pdfPrintingFinished(self, filePath: str, success: bool):
     if not success:
         sys.stderr.write("failed to print to output file '%s'" %
                          (filePath, ))
         QCoreApplication.exit(1)
     else:
         QCoreApplication.quit()
Example #2
0
 def loadFinished(self, ok: bool):
     if not ok:
         sys.stderr.write("failed to load URL '{}'".format(
             self.m_inputPath))
         QCoreApplication.exit(1)
         return
     self.m_page.printToPdf(self.m_outputPath)