Changeset 45eddeb7 in sasview
- Timestamp:
- Feb 16, 2018 1:39:35 PM (7 years ago)
- Children:
- 250f2393
- Parents:
- 2aba0a4
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
src/sas/sasgui/guiframe/report_dialog.py
r2aba0a4 r45eddeb7 127 127 try: 128 128 from xhtml2pdf import pisa 129 data = "<html><body><p>To PDF or not to PDF</p></body></html>" 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 , encoding='utf-8', show_error_as_pdf=True)133 pisaStatus = pisa.CreatePDF(data, dest=resultFile) 133 134 # close output file 134 135 resultFile.close()
Note: See TracChangeset
for help on using the changeset viewer.