Changeset 18d50612 in sasview for src/sas/sasgui/guiframe
- Timestamp:
- Feb 15, 2018 7:01:35 AM (7 years ago)
- Children:
- a67d674
- Parents:
- 61bfd36
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
src/sas/sasgui/guiframe/report_dialog.py
r69a6897 r18d50612 127 127 try: 128 128 from xhtml2pdf import pisa 129 from StringIO import StringIO 129 130 # open output file for writing (truncated binary) 130 131 resultFile = open(filename, "w+b") 131 132 # convert HTML to PDF 132 pisaStatus = pisa.CreatePDF( data, dest=resultFile)133 pisaStatus = pisa.CreatePDF(StringIO(data.encode('utf-8'), dest=resultFile) 133 134 # close output file 134 135 resultFile.close()
Note: See TracChangeset
for help on using the changeset viewer.