[reportlab-users] Return a file object rather than save afile...

Andy Robinson andy at reportlab.com
Fri Oct 2 08:15:06 EDT 2009


2009/10/2 Roberto Alsina <ralsina at netmanagers.com.ar>:

> Isn't this faster?

> buf = cStringIO.StringIO()

> c=Canvas(buf)

> #do your drawing

> c.save()

> rawPdfFileContent = buf.getvalue()



It's certainly one line shorter and thus more elegant - thanks...

- Andy


More information about the reportlab-users mailing list