Changeset f2530048 in sasview
- Timestamp:
- Aug 29, 2018 5:04:23 AM (6 years ago)
- Branches:
- ESS_GUI, ESS_GUI_batch_fitting, ESS_GUI_bumps_abstraction, ESS_GUI_iss1116, ESS_GUI_iss879, ESS_GUI_opencl, ESS_GUI_ordering, ESS_GUI_sync_sascalc
- Children:
- e9359e0a
- Parents:
- 906e0c7
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
src/sas/qtgui/Utilities/ReportDialog.py
r5330be2 rf2530048 3 3 import re 4 4 import logging 5 import traceback 5 6 from xhtml2pdf import pisa 6 7 … … 100 101 pictures = self.getPictures(basename) 101 102 102 # translate png references into html from base64 string to on-disk name 103 cleanr = re.compile('<img src.*$') 103 # self.data_html contains all images at the end of the report, in base64 form; 104 # replace them all with their saved on-disk filenames 105 cleanr = re.compile('<img src.*$', re.DOTALL) 104 106 replacement_name = "" 105 107 html = self.data_html 106 108 for picture in pictures: 107 109 replacement_name += '<img src="'+ picture + '"><p></p>' 110 replacement_name += '\n' 108 111 # <img src="data:image/png;.*> => <img src=filename> 109 112 html = re.sub(cleanr, replacement_name, self.data_html) … … 178 181 return pisaStatus.err 179 182 except Exception as ex: 180 logging.error("Error creating pdf: " + str(ex)) 183 # logging.error("Error creating pdf: " + str(ex)) 184 logging.error("Error creating pdf: " + traceback.format_exc()) 181 185 return False 182 186
Note: See TracChangeset
for help on using the changeset viewer.