Re: Adding annotations to a pdf

Robin Becker <[email protected]>
Newsgroups gmane.comp.python.reportlab.user
Message-ID <[email protected]>
Hi pianoslum,

I suspect there may be something amiss with your code as we have a test of highlightAnnotation in the reportlab source code tests see

https://bitbucket.org/rptlab/reportlab/src/default/tests/test_pdfgen_links.py#


I have just run this with Python2.7 and tested that the annotations work using both acrobat reader and evince (running in ubuntu 
16.04).


Perhaps you could post the actual code that your are testing with (or a cut down example) and some details of the envirnment eg 
python version, os etc etc.

-- 
Robin Becker

On 09/12/2018 22:37, pianoslum wrote:
> Dear all,
> 
> using reportlab in python, I manged to print a text and export this to a new pdf:
> canvas.drawString(10, 100, "Hello world")
> 
> However, I didn't manage to add an annotation. I tried
> 
> canvas.highlightAnnotation("TEST", Rect=[1, 1, 1, 1], relative=1)
> 
> which didn't raise an error, however evince cannot parse the resulting pdf file.
> Am I doing something wrong? The docu of the related functions is very sparse, so I would appreciate any help.
> 
> Cheers!
> 
........
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.