[reportlab-users] Multiple hyphenation issue
Christoph Zwerschke
cito at online.de
Fri Apr 3 14:47:08 EDT 2020
Am 02.04.2020 um 21:33 schrieb Robin Becker:
> it can be done, but I normally don't like to release half finished work
> as soft-hyphens will fail as soon as someone uses a <b>Bold</b> word.
> I'll try hard to think how to make the mult frag stuff to work.
Understand. Would be great to get it working with fragments as well.
> Also I think your patch was on the right track, my version might be a
> bit overkilled, but I haven't yet tried all the ways word splitting can
> go wrong.
I guess the way forward is to first add some more tests to the test
suite, like the one I posted, but also with fragements, to make sure it
works in all cases and does not break anything else.
It looks like many of the tests require manual inspection of the
produced PDFs, is that right? In that case it will help to store the
files with the expected output and then automatically do a filecmp.cmp()
between that and the produced output in the tests and let them fail if
they are not equal. I have been recently doing this with some of my
report producing code and it works very well and gives good confidence
that nothing is broken. Just one little trick was necessary - in order
to produce PFDs with the same timestamp, I set canvas.setDateFormatter
to a function that returns a fixed date.
If I can help in any way to get this feature implemented, let me know.
-- Christoph
More information about the reportlab-users
mailing list