[reportlab-users] Has PageCompression changed from RL12 to RL22?

Paolo G. Cantore paolo.cantore at t-online.de
Mon Oct 27 17:59:19 EDT 2008


Tim Roberts schrieb:

> Paolo G. Cantore wrote:

>

>> Every day we are sending out several thousands of emails with an

>> attachment of

>> PDF documents generated with Reportlab Toolkit (PageCompression enabled).

>>

>> When I was trying to upgrade from version 1.20 to 2.2 our customers

>> where not

>> able to open the documents with Adobe Reader anymore. Only a blank

>> page was

>> diplayed.

>>

>> I had to go back to version 1.20 immediately to prevent more complaints.

>>

>> After a series of tests I found a possible reason. With

>> PageCompression enabled

>> the whole content of the document was put on a single line (length

>> ~28.000 chars).

>>

>> But in version 1.20 the compressed content is splitted into lines with

>> a length

>> of 60 characters ending with ^M (x'0d' = carriage return). This worked

>> fine

>> for all of our customers.

>>

>

> Why does this matter? How are you encoding the file for attachment?

> Aren't you using base64?

>

> PDF is a binary format. Quoted-printable might work, but I would think

> anything other than base64 was just asking for trouble.

>

>

Historically we used no encoding and most of the traffic is still
unencoded. This works for more than 80% of our users.

I agree totally with you about base64 encoding. But it's a big
mess to deal with so different beasts as firewalls, spamfilters,
virus scanning programs, mail servers and mail clients.

We could not find a generally usable encoding method. Some
costumers complained of base64 encoding others of zip
encoding and others of no encoding.

I appreciate your suggestion to use base64 as the standard
encoding when moving to Reportlab 2.2. Maybe this way
we'll reach 85% - 90% of our customers. I'll give it a try.

Thank you for your help.


More information about the reportlab-users mailing list