[reportlab-users] FW: Problem with linkAbsolute in trunk.
Ian Sparks
Ian.Sparks at etrials.com
Thu Apr 12 13:13:29 EDT 2007
Robin Becker wrote:
> 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.
Well yours seems a deeper mystery but my complaint is that the docs (and
comments in the RL code) say that if you want a border you can pass in
Border='[1 1 1]'. But _annFormat as written just blats that parameter :
D["Border"] = PDFArray(border)
With no prior attempt to do something like :
border = RescueFromParameter(D["Border"])
And that's what my fix attempted to do. But if we just need to change
the docs to say "In order to draw a border around your links you need
to..." then fine.
I can change my code no problem but the code and the
documentation/comments in RL are out of whack and I think that needs to
be addressed.
Thanks.
> -----Original Message-----
> From: reportlab-users-bounces at reportlab.com [mailto:reportlab-users-
> bounces at reportlab.com] On Behalf Of Robin Becker
> Sent: Thursday, April 12, 2007 11:58 AM
> To: Support list for users of Reportlab software
> Subject: Re: [reportlab-users] FW: Problem with linkAbsolute in
trunk.
>
> 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:
> border.append(PDFArray(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
> _______________________________________________
> reportlab-users mailing list
> reportlab-users at reportlab.com
> http://two.pairlist.net/mailman/listinfo/reportlab-users
-----------------------------------------
Disclaimer:
This e-mail communication and any attachments may contain
confidential and privileged information and is for use by the
designated addressee(s) named above only. If you are not the
intended addressee, you are hereby notified that you have received
this communication in error and that any use or reproduction of
this email or its contents is strictly prohibited and may be
unlawful. If you have received this communication in error, please
notify us immediately by replying to this message and deleting it
from your computer.
Thank you.
More information about the reportlab-users
mailing list