I haven't looked at the code yet, but I remember having the same problems with my report lab pdf creation... When I opened the created pdf file with the 'rb' parameter it worked perfectly...
as in return open(filename,'rb').read()
Oh, yes !
This would explain why it works fine if the server is under *Nix and not if it is under Windows.
Correct.
However no open is done, the file is built in memory with a cStringIO and returned to the browser using StringIO's getvalue() method. How could I make it binary safe ?
Urgh, sorry, don't know... I wish I knew it myself... that's why I moved to storing it on a file and then opening the file. What I do is to make a file in the tempory directory of the server. I wished I didn't had to use this method. Regards, Tom.