[reportlab-users] Emailing Corrupting reportlab PDFs follow up

Dinu Gherman reportlab-users@reportlab.com
Wed, 26 May 2004 12:16:08 +0200


postmaster@binarystar.org:

> I have attached the files for you to examine
> hopefully I have provided enough information

Here's a quick and dirty way of finding out if Acrobat Reader
thinks your received PDF is corrupted or not. A number of lines
equal to 1 means the file has been touched in a malicious way:

   >>> corrupt = open("corrupt_file.pdf", "rb").read()
   >>> working = open("working_file.pdf", "rb").read()
   >>>
   >>> len(corrupt.split("\r\n"))
   1
   >>> len(working.split("\r\n"))
   214

> a. Using python 2.3 and reportlab 1.19, windows

Now guess, which component is most likely to be blamed for that? ;-)

Dinu

--
Dinu C. Gherman - http://python.net/~gherman
......................................................................
Get your Bushy protest panties now! - http://www.axisofeve.org