[reportlab-users] bug in documentation

Lukasz Michalski lm at zork.pl
Tue Oct 5 08:27:42 EDT 2010


Hi,

"Code overview" on
https://www.reportlab.com/software/documentation/sample-projects/rml-with-turbogears2/

has a little bug in section:

from rlextra.rml2pdf import rml2pdf
rml = mergeRML(q) #merge the template and variables
buf = cStringIO.StringIO()
rml2pdf.go(rml, outputFileName=buf) #creates the pdf
pdfData = buf.read()

In my case (python 2.7, RL 2.4 and 2.5) i need to do buf.reset() before
buf.read().

It seems that rml2pdf leaves buf with file pointer at end of data.

Regards,
Łukasz

-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 262 bytes
Desc: OpenPGP digital signature
Url : <http://two.pairlist.net/pipermail/reportlab-users/attachments/20101005/fd99b755/attachment-0001.pgp>


More information about the reportlab-users mailing list