[reportlab-users] canvas.textAnnotation0

Doug reportlab-users@reportlab.com
Wed, 19 Feb 2003 16:59:50 -0500


Cool.  I'll look forward to using it.

-----Original Message-----
From: reportlab-users-admin@reportlab.com
[mailto:reportlab-users-admin@reportlab.com]On Behalf Of Ian Sparks
Sent: Wednesday, February 19, 2003 3:34 PM
To: Reportlab-Users (E-mail)
Subject: [reportlab-users] canvas.textAnnotation0


In playing with ReportLab I've fleshed out the experimental pdfdoc.TextAnnotation class a little more so that it now supports :

Types :
        /Note
        /Comment
        /Help
        /Key
        /NewParagraph
        /Paragraph
Color
Opacity (0..1)
Author
Date (pdfdoc.PDFDate's only, Adobe tools don't seem to like random 'datelike' strings)
Annotation flags from PDF Ref 3rd Ed Section 8.4 page 493 :

   Invisible
   Hidden
   Print
   NoZoom
   NoRotate
   NoView
   ReadOnly

I'm sure I have these flags right but only Print and ReadOnly appear to work in Acrobat 5.0.

An example :

canv.textAnnotation0('Comment', Rect=[34,0,0,615], addtopage=1,Author='Test
Opacity=0.1',Color=[0.7,0.8,1],Type='/Comment',Opacity=0.1)

Example output file from my tests attached.

- Ian Sparks.