[reportlab-users] Ok to ask a simple z3c.rml question?

Werner Thie wthie at thiengineering.ch
Tue Mar 11 10:25:05 EDT 2008


Hmm, there is aboslutely no reference to LINEEND in sight in the whole
z3c.rml package, I found the place in pdfutils.py in replab though and
it's preset to '\015\012'. It might be that the file to be written to is
opened in text instead of binary mode, we see therefore a superfluous
'\015' before the LINEEND. I'll try to drill down a bit further and
locate the offending code.

Does anybody know whom to contact with a bug report, or better a fix?

Thxs, Werner Thie

Robin Becker wrote:

> Werner Thie wrote:

>> Hi

>>

>> Just stumbled over the z3c.rml package and tried to produce some PDFs

>> on MSWindows/Python25. Funny enough that all the produced PDFs do not

>> contain 0x0d 0x0a lien terminating sequences but 0x0d 0x0d 0x0a which

>> sends Acrobat Reader into Neverland. When exchanging the produced

>> patterns with correct line terminating sequences 0x0d 0x0a, the docs

>> rendered diff ok to the expected ones, or in other words - they are

>> correct and show up ok in Acrobat.

>>

>> Is there a simple explanation for this behavior or should I have

>> configured something before running test code?

>>

>> Thxs, Werner Thie

> .......

> Unfortunately that sounds like a bug in z3c.rml. When reportlab runs the

> eol character is supposed to be LINEEND = '\015\012'; and that should be

> preserved as PDF is not a text format. I suspect something is writing

> the files in the wrong mode ie text. They should always be written in

> binary. Since 0x0a is '\n' and python converts '\n' --> '\r\n' for text

> files that would seem to make '\r\n' become '\r\r\n' ie what you observe.



More information about the reportlab-users mailing list