Changeset ee4a2bb in sasview
- Timestamp:
- Feb 26, 2018 5:40:48 AM (7 years ago)
- Children:
- a7db85f
- Parents:
- 250f2393
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
src/sas/sasgui/guiframe/report_dialog.py
r250f2393 ree4a2bb 22 22 PANEL_WIDTH = 530 23 23 PANEL_HEIGHT = 700 24 FONT_VARIANT = 024 FONT_VARIANT = 1 25 25 ISPDF = True 26 26 … … 125 125 : filename: name of file to be saved 126 126 """ 127 try: 128 from xhtml2pdf import pisa 129 # open output file for writing (truncated binary) 130 resultFile = open(filename, "w+b") 131 # convert HTML to PDF 132 pisaStatus = pisa.CreatePDF(data, dest=resultFile) 133 # close output file 134 resultFile.close() 135 self.Update() 136 return pisaStatus.err 137 except Exception: 138 logger.error("Error creating pdf: %s" % sys.exc_value) 127 #try: 128 from xhtml2pdf import pisa 129 # open output file for writing (truncated binary) 130 resultFile = open(filename, "w+b") 131 # convert HTML to PDF 132 pisaStatus = pisa.CreatePDF(data, dest=resultFile) 133 # close output file 134 resultFile.close() 135 self.Update() 136 # return pisaStatus.err 137 #except Exception: 138 # logger.error("Error creating pdf: %s" % sys.exc_value) 139 logger.error("Error creating pdf: %s" % pisaStatus.err) 139 140 return False
Note: See TracChangeset
for help on using the changeset viewer.