Changeset 42fe90c in sasview for src/sas/sasgui/guiframe/report_dialog.py
- Timestamp:
- Feb 16, 2018 1:03:38 AM (7 years ago)
- Children:
- 468daa10
- Parents:
- a67d674
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
src/sas/sasgui/guiframe/report_dialog.py
ra67d674 r42fe90c 125 125 : filename: name of file to be saved 126 126 """ 127 try:128 129 130 131 132 133 134 135 136 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, 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 139 return False
Note: See TracChangeset
for help on using the changeset viewer.