[reportlab-users] PDF without file

John J. Lee jjlee at reportlab.com
Tue May 30 13:36:19 EDT 2006

On Tue, 30 May 2006, Robin Becker wrote:
> François Pinard wrote:
>> [Michael Hipp]
>> Hi, people.  I did not follow the thread and may be fully out of context, 
>> so take me with a few grains of salt :-).
>> Contents of a CStringIO may not be Unicode (unless Python changed 
>> recently).  Now that Reportlab is Unicode-aware, one may sometimes have to 
>> resort to the slower StringIO.
> Being in utterly duh Homer mode I completely forgot that there is indeed an 
> existing string output for the code in the canvas.
> Just use
> pdf = c.getpdfdata()

Just by the way, the PDF data itself is actually binary, so the lack of 
unicode support in cStringIO is not relevant.  But Robin's .getpdfdata() 
is better.


More information about the reportlab-users mailing list