[reportlab-users] External hyperlinks in SVG output

Robin Becker robin at reportlab.com
Tue Feb 24 13:05:16 EST 2009


.......

>

> I've been looking at ReportLab's PDF code, in particular the PDF

> canvas object (which lives in reportlab/pdfgen/canvas.py rather than

> reportlab/graphics/renderPDF.py) and see there is some code for "PDF

> Actions" (a rather general feature which includes linking to an

> external URL, or URI as Adobe seem to prefer). In the PDF canvas

> linkURL method a "PDF Action" is associated with an invisible "PDF

> Annotation", which is a rectangular region. If am I reading the code

> right, this "link region" has to be a rectangle - it can't be a

> rotated rectangle where the edges are not parallel to the page edges.

> Can a "PDF Action" be attached to an ordinary shape, like a visible

> (rotated) rectangle, or any closed path?

>

> Peter

........

my reading of the latest link annotation dictionary definition seems to indicate
that it can be a rectangle /Rect entry or



> QuadPoints

> array

> (Optional; PDF 1.6) An array of 8 × n numbers specifying the coordinates of nquadrilaterals in default user space that comprise the region in which the link should be activated. The coordinates for each quadrilateral are given in the order

> x1 y1 x2 y2 x3 y3 x4 y4

> specifying the four vertices of the quadrilateral in counterclockwise order. For orientation purposes, such as when applying an underline border style, the bottom of a quadrilateral is the line formed by (x1 , y1) and (x2 , y2).

> If this entry is not present or the viewer application does not recognize it, the region specified by the Rect entry should be used. QuadPoints should be ignored

> if any coordinate in the array lies outside the region specified by Rect.


it doesn't look like you can get a generic path region as the clickable.
--
Robin Becker


More information about the reportlab-users mailing list