Changeset 92f586e9 in sasview
- Timestamp:
- Feb 16, 2018 2:08:03 AM (7 years ago)
- Children:
- 2aba0a4
- Parents:
- 468daa10
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
src/sas/sasgui/guiframe/report_dialog.py
r468daa10 r92f586e9 125 125 : filename: name of file to be saved 126 126 """ 127 #try:128 from xhtml2pdf import pisa129 # open output file for writing (truncated binary)130 resultFile = open(filename, "w+b")131 # convert HTML to PDF132 pisaStatus = pisa.CreatePDF(data, dest=resultFile, encoding='utf-8')133 # close output file134 resultFile.close()135 self.Update()136 return pisaStatus.err137 #except Exception:138 #logger.error("Error creating pdf: %s" % sys.exc_value)139 #return False127 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, encoding='utf-8') 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 return False
Note: See TracChangeset
for help on using the changeset viewer.