[reportlab-users] FW: Problem with linkAbsolute in trunk.

Robin Becker robin at reportlab.com
Thu Apr 12 11:57:43 EDT 2007

Ian Sparks wrote:

> Robin Becker wrote :

>> yes I'll have a go at that.


> Thanks.

well OK now the mysteries begin. That code works pretty much as intended; the
problem may lie in the other arguments. In particular the border has
thickness(width), horizontal and vertical radii and possibly a dash array.

The code should look something like

def _annFormat(D,color,thickness,dashArray,hradius=0,vradius=0):
from reportlab.pdfbase.pdfdoc import PDFArray
if color:
D["C"] = PDFArray([color.red, color.green, color.blue])
border = [hradius,vradius,thickness or 0]
if dashArray:
D["Border"] = PDFArray(border)

I have tested this and it works just fine. To get a border to appear you need to
specify a proper color and a thickness at least. The current code appears to
work fine if those two are specified. I am unsure whats going on with Ian's code.

More mysterious is that the Border entry is supposed to have been replaced long
ago by the BS entry, but I find I cannot seem to get it to work properly.
Robin Becker

More information about the reportlab-users mailing list