I am using ReportLab to create PDF using Python. I want to add a shape to the canvas, and this shape acts as a hyperlink. What is the easiest way to make a rectangle in the following example link to google.com?
from reportlab.pdfgen import canvas
from reportlab.lib.units import inch
c = canvas.Canvas("hello.pdf")
c.translate(inch,9*inch)
c.rect(inch,inch,1*inch,1*inch, fill=1)
c.showPage()
c.save()
source
share