diff options
| author | Dhara Shah <dsh@dsh> | 2009-01-16 16:51:49 +0530 |
|---|---|---|
| committer | Dhara Shah <dsh@dsh> | 2009-01-16 16:51:49 +0530 |
| commit | 245c01fb2eb3b90aef92dabbf7f5a97a66cdebf7 (patch) | |
| tree | 95d139037501710692c29c2617ae957f7c227d44 | |
| parent | 232797ffe21f0a03d17554eb7e872e0caecd813a (diff) | |
changes for the logo
bzr revid: dsh@dsh-20090116112149-baiylod2nwz1e3xf
| -rw-r--r-- | bin/report/render/rml2pdf/trml2pdf.py | 14 |
1 files changed, 8 insertions, 6 deletions
diff --git a/bin/report/render/rml2pdf/trml2pdf.py b/bin/report/render/rml2pdf/trml2pdf.py index 91108f12f50..1084b3f3753 100644 --- a/bin/report/render/rml2pdf/trml2pdf.py +++ b/bin/report/render/rml2pdf/trml2pdf.py @@ -48,7 +48,7 @@ import reportlab import re from reportlab.pdfgen import canvas from reportlab import platypus - +import cStringIO import utils import color import os @@ -351,26 +351,28 @@ class _rml_canvas(object): import urllib from reportlab.lib.utils import ImageReader - s = StringIO() +# s = StringIO() if not node.hasAttribute('file'): if node.hasAttribute('name'): image_data = self.images[node.getAttribute('name')] - s.write(image_data) + s = cStringIO.StringIO(image_data) else: import base64 image_data = base64.decodestring(node.firstChild.nodeValue) if not image_data: return False - s.write(image_data) + s = cStringIO.StringIO(image_data) +# s.write(image_data) else: if node.getAttribute('file') in self.images: - s.write(self.images[node.getAttribute('file')]) + s = cStringIO.StringIO(self.images[node.getAttribute('file')]) +# s.write(self.images[node.getAttribute('file')]) else: try: u = urllib.urlopen(str(node.getAttribute('file'))) except: u = file(os.path.join(self.path,str(node.getAttribute('file'))), 'rb') - s.write(u.read()) + s = cStringIO.StringIO(u.read()) img = ImageReader(s) (sx,sy) = img.getSize() |
