4

I was using pdfcomment to generate annotations in PDF files. But when I try to view the output PDF in Evince the annotations appear as a weird symbol that is not clickable:

screenshot

Any suggestions for fixing the problem? I am using Evince 3.4.0 with Poppler 0.18. I tried viewing other PDFs with annotations in Evince and those seem to be fine, so I think it might be a pdfcomment issue.

Here is an example:

\documentclass{article}
\usepackage{pdfcomment}

\begin{document}
\pdfcomment{hello}world                                                                                                                                                                                            
\end{document}

The generated pdf looks just like the screenshot above.

  • could you provide a MWE for folks to play with? – cmhughes Aug 3 '12 at 23:46
  • I have the same issue with Okular. Have you found any working solution? – KIAaze Dec 2 '16 at 0:58
2

According to the pdfcomment author, this problem was due to Evince not following the PDF Reference on annotations. Evince seems to have a problem with the zero width that pdfcomment specifies for its annotations.

See also bug 685334 (Fixed on June, 2015 and available since Evince 3.18).

A workaround could be to directly use the \pdfannot command. I use this:

\makeatletter
\newcommand{\annotate}[2][]{%
\pdfstringdef\x@title{#1}%
\edef\r{\string\r}%
\pdfstringdef\x@contents{#2}%
\pdfannot
width 2\baselineskip
height 2\baselineskip
depth 0pt
{
/Subtype /Text
/T (\x@title)
/Contents (\x@contents)
}%
}
\makeatother

(copied from here)

  • Could you please give a full example? How should that code snippet be used in a complete latex file? – KIAaze Dec 2 '16 at 1:01

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.