[reportlab-users] TextAnnotation on a pdf document

Robin Becker robin at reportlab.com
Thu Jan 6 06:57:18 EST 2005


Florian Reiser wrote:
> Hello,
> 
> I have found the class TextAnnotation in reportlab.pdfbase.pdfdoc and want
> to use it. How do I tell reportlab in platypus mode to place a
> TextAnnotation on a specific position? e.g. page 1
> 
> Greets
> 
> Florian
> 
from reportlab.pdfgen.canvas import Canvas

c = Canvas('tannot.pdf')

c.drawString(72,72,'Hello World!')
c.textAnnotation0('Annotate\nThe\nWorld!', Rect=(144,144,72,72), 
name='myFirstTextAnnotation')
c.save()

-- 
Robin Becker


More information about the reportlab-users mailing list