tools/pythonpoint/pythonpoint.py
branchpy33
changeset 3723 99aa837b6703
parent 3721 0c93dd8ff567
child 3794 398ea04239b5
--- a/tools/pythonpoint/pythonpoint.py	Sun Feb 17 12:13:56 2013 +0000
+++ b/tools/pythonpoint/pythonpoint.py	Tue Apr 30 14:28:14 2013 +0100
@@ -77,7 +77,7 @@
 from reportlab.lib import styles
 from reportlab.lib import colors
 from reportlab.lib.units import cm
-from reportlab.lib.utils import getStringIO
+from reportlab.lib.utils import getBytesIO
 from reportlab.lib.enums import TA_LEFT, TA_RIGHT, TA_CENTER, TA_JUSTIFY
 from reportlab.pdfbase import pdfmetrics
 from reportlab.pdfgen import canvas
@@ -352,7 +352,7 @@
         if self.verbose:
             print(filename)
         #canv = canvas.Canvas(filename, pagesize = pageSize)
-        outfile = getStringIO()
+        outfile = getBytesIO()
         if self.notes:
             #translate the page from landscape to portrait
             pageSize= pageSize[1], pageSize[0]
@@ -403,7 +403,7 @@
         if self.sourceFilename :
             filename = os.path.splitext(self.sourceFilename)[0] + '.pdf'
 
-        outfile = getStringIO()
+        outfile = getBytesIO()
         doc = SimpleDocTemplate(outfile, pagesize=rl_config.defaultPageSize, showBoundary=0)
         doc.leftMargin = 1*cm
         doc.rightMargin = 1*cm