[reportlab-users] Bug in Paragraph class with tags when switching frames
Dinu Gherman
gherman at darwin.in-berlin.de
Fri Nov 2 07:24:44 EDT 2007
Hi,
I've been testing a ReportLab extension for hyphenation written by
Henning von Bargen. It seems a lot like we found a bug in Platypus
paragraphs (without any extension added). Briefly, when using tags
like "font" or "a" it can happen that adjacent words are combined
into one new word, when the paragraph is split over two frames.
The attached two test cases show this using somewhat lengthy German
words. test_para_in_frame1.pdf contains in the right frame the word
"nurein" that should actually be the two words "nur ein". You can
observe this for "font" and "a" tags, if you edit the code for
test_para_in_frame1.py.
test_para_in_frame2.pdf is almost identical, but contains only the
one right frame from test_para_in_frame2.pdf with only the piece
of text to be expected there, i.e. without using any frame switch.
In this case neither adding "font" nor "a" tags leads to the effect
described above.
I suspect some word fragment calculation in Paragraph in combination
with frame switching is buggy. It's definitly a nasty bug, since it
is hard to accept for high quality output.
All this was tested on the latest release 2.1. I won't test this on
the current code in SVN, since this is not an option for certain
kind of clients. If it works on the SVN code I suggest building
a new release 2.2, which is probably a good idea, anyway.
Regards,
Dinu
-------------- next part --------------
A non-text attachment was scrubbed...
Name: test_para_in_frame1.py
Type: application/octet-stream
Size: 2107 bytes
Desc: not available
Url : <http://two.pairlist.net/pipermail/reportlab-users/attachments/20071102/60963876/attachment-0002.obj>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: test_para_in_frame1.pdf
Type: application/pdf
Size: 2077 bytes
Desc: not available
Url : <http://two.pairlist.net/pipermail/reportlab-users/attachments/20071102/60963876/attachment-0002.pdf>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: test_para_in_frame2.py
Type: application/octet-stream
Size: 1798 bytes
Desc: not available
Url : <http://two.pairlist.net/pipermail/reportlab-users/attachments/20071102/60963876/attachment-0003.obj>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: test_para_in_frame2.pdf
Type: application/pdf
Size: 2039 bytes
Desc: not available
Url : <http://two.pairlist.net/pipermail/reportlab-users/attachments/20071102/60963876/attachment-0003.pdf>
More information about the reportlab-users
mailing list