eric7/WebBrowser/WebBrowserTabWidget.py

branch
eric7
changeset 8322
b422b4e77d19
parent 8318
962bce857696
child 8356
68ec9c3d4de5
equal deleted inserted replaced
8319:ea11a3948f40 8322:b422b4e77d19
707 self, 707 self,
708 self.tr("Print to PDF"), 708 self.tr("Print to PDF"),
709 self.tr("""<p>The file <b>{0}</b> exists""" 709 self.tr("""<p>The file <b>{0}</b> exists"""
710 """ already. Shall it be""" 710 """ already. Shall it be"""
711 """ overwritten?</p>""").format(filePath), 711 """ overwritten?</p>""").format(filePath),
712 E5MessageBox.StandardButtons( 712 E5MessageBox.No | E5MessageBox.Yes,
713 E5MessageBox.No |
714 E5MessageBox.Yes),
715 E5MessageBox.No) 713 E5MessageBox.No)
716 if res == E5MessageBox.No: 714 if res == E5MessageBox.No:
717 return 715 return
718 browser.page().printToPdf( 716 browser.page().printToPdf(
719 lambda pdf: self.__pdfGeneratedForSave(filePath, pdf), 717 lambda pdf: self.__pdfGeneratedForSave(filePath, pdf),
757 self, 755 self,
758 self.tr("Print to PDF"), 756 self.tr("Print to PDF"),
759 self.tr("""<p>The PDF could not be written to file <b>{0}""" 757 self.tr("""<p>The PDF could not be written to file <b>{0}"""
760 """</b>.</p><p><b>Error:</b> {1}</p>""").format( 758 """</b>.</p><p><b>Error:</b> {1}</p>""").format(
761 filePath, pdfFile.errorString()), 759 filePath, pdfFile.errorString()),
762 E5MessageBox.StandardButtons( 760 E5MessageBox.Ok)
763 E5MessageBox.Ok))
764 761
765 @pyqtSlot() 762 @pyqtSlot()
766 def printPreviewBrowser(self, browser=None): 763 def printPreviewBrowser(self, browser=None):
767 """ 764 """
768 Public slot called to show a print preview of the displayed file. 765 Public slot called to show a print preview of the displayed file.

eric ide

mercurial