2

I am writing my CV in LaTeX and thought it'd be fun to add a little Easter Egg when hovering over LaTeX:

enter image description here

That was created with package pdfcomment.

However, I've seen some comments (for example, here) that mention that these tooltips are generated via (or at least use) JavaScript.

Is that a potential issue, given the purpose of a CV? Is there a risk that I send this to an employer or whatnot and they have their security settings set to the max and get a "this file may have a virus" or whatnot? Or would the tooltip simply be disabled in the worst case? Or is the tooltip recognized as perfectly harmless and will always be active (assuming the mouse hovers over "LaTeX")?

Also, does this depend on the package used? If pdfcomment has any sort of "risk" (in terms of frightening the reader, not of actual malicious behavior), is there a package that doesn't?

1
  • I wouldn't consider doing this if you want your cv to be taken seriously, also if you do use javascript the majority of pdf viewers will not support it. Nov 6, 2016 at 20:34

1 Answer 1

3

Although there are other tooltip solutions (with more features), pdfcomment does not use Javascript. The relevant code is:

\newcommand{\pc@annot@tooltip}%
{%
  /TU (\pc@pdfenc@contents)\space%
  /T (tooltip \thezref@unique)\space%
  /C [ ]\space%
  /FT/Btn\space%
  /F 768\space%
  /Ff 65536\space%
  /H/N\space%
  /BS << /W 0 >>\space%
}%

That's standard PDF-ish! So, there's no security issue. In the worst case, the PDF viewer is just unable to interpretate the 'tooltip' command. Usually, simple tooltips aren't problematic.

2
  • To be explicit: if the viewer cannot interpret the command, will it ignore the command (no tooltip) or will it throw an error (file won't open)? Obviously this depends on the viewer, but do you know what the common behavior is?
    – Wasabi
    Nov 7, 2016 at 11:34
  • Usually, it will be ignored! I've only seen errors about corrupt files. If the viewer would 'throw exceptions' about every little details, you would have to read a lot! ;-) Furthermore there are various PDF standards, which e.g. do or do not allow 'interactive' elements, ... Simple PDF viewer don't care about all this!
    – Josef
    Nov 7, 2016 at 11:55

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .