[reportlab-users] Anchors

Robin Becker robin at reportlab.com
Wed Jan 31 13:49:23 EST 2007


Juha Tuomala wrote:

>

>

> On Tuesday 30 January 2007 16:10, you wrote:

>> I think these are special cases which I need to debug more carefully. For

>> example if I use a single space before your definition I get a typeface error. I

>> think it's because we have a single tag only inside the paragraph. I suspect

>> this single <a tag> case will need to be moved to the other branch to make

>> things work properly as the single tag branch doesn't know about the cbDefn

>> stuff at all (I suppose I naively thought people using it would do as I wanted).

>

> Okay, I got around this by injecting that dot into document, but it's bit

> kludge and will revert it when you have a final solution for this. Just

> don't remember to advertise the fix on this list. :)

>

> Thank you for better anchor support, that was useful.

>

>

> Tuju

>


OK I fixed up the <a> tag special cases and now

Paragraph("<a name=anchor/>") seems to work OK. I added some more usage in the
test_platypus_paragraphs.py file. Just to complicate things even further I added
an AnchorFlowable class use like

story.append(AnchorFlowable('myjumptarget'))

this just eliminates the need to provide a paragraph to put your anchor tag in,
but has its own problems since we seem to quietly ignore flowables with zero
size at certain parts of the draw phase. I'm not sure if I found all those
cases, but probably not.
--
Robin Becker


More information about the reportlab-users mailing list