Changeset 18d50612 in sasview for src/sas/sasgui/guiframe


Ignore:
Timestamp:
Feb 15, 2018 7:01:35 AM (7 years ago)
Author:
wojciech
Children:
a67d674
Parents:
61bfd36
Message:

Debuging report generation

File:
1 edited

Legend:

Unmodified
Added
Removed
  • src/sas/sasgui/guiframe/report_dialog.py

    r69a6897 r18d50612  
    127127        try: 
    128128            from xhtml2pdf import pisa 
     129            from StringIO import StringIO 
    129130            # open output file for writing (truncated binary) 
    130131            resultFile = open(filename, "w+b") 
    131132            # convert HTML to PDF 
    132             pisaStatus = pisa.CreatePDF(data, dest=resultFile) 
     133            pisaStatus = pisa.CreatePDF(StringIO(data.encode('utf-8'), dest=resultFile) 
    133134            # close output file 
    134135            resultFile.close() 
Note: See TracChangeset for help on using the changeset viewer.