Bug 105326 - Add support for pdf tooltip!
Summary: Add support for pdf tooltip!
Alias: None
Product: poppler
Classification: Unclassified
Component: general (show other bugs)
Version: unspecified
Hardware: Other All
: medium normal
Assignee: poppler-bugs
QA Contact:
Depends on:
Reported: 2018-03-02 12:12 UTC by 9u0h923nhu
Modified: 2018-08-20 21:35 UTC (History)
1 user (show)

See Also:
i915 platform:
i915 features:

pdf file with a few tooltip annotations (61.40 KB, application/pdf)
2018-03-04 05:41 UTC, oliver.sander

Description 9u0h923nhu 2018-03-02 12:12:49 UTC
Some PDf files have 'tooltip' feature on them. For an example document, see the section 3.2 (\pdftooltip command) of the 'package documentation' file on this website (https://www.ctan.org/pkg/pdfcomment). 

I tested this using the aformentioned .pdf file and various PDF readers. It worked perfectly with Microsoft Edge (Windows), SumatraPDF (Windows, Wine on Linux and macOS), Adobe Acrobat Reader (Windows and macOS), and Foxit reader (Windows, Linux, and macOS). But not with Evince. (Actually I couldn't find any Linux-native reader that support this tooltip feature.) An Evince developer told me that this is because Poppler doesn't support API for tooltips (https://bugzilla.gnome.org/show_bug.cgi?id=793986).
Comment 1 Albert Astals Cid 2018-03-03 19:05:21 UTC
Please attach a file.
Comment 2 oliver.sander 2018-03-04 05:41:36 UTC
Created attachment 137770 [details]
pdf file with a few tooltip annotations

Extracted from the example file of the LaTeX 'pdfcomment' package.
Comment 3 Jose Aliste 2018-03-04 13:09:06 UTC
Extracting one of the three annotations in the example file we get
/Type /Annot
/Subtype /Widget /TU (Sulfuric\040acid) /T (tooltip zref@1) /C [ ] /FT/Btn /F 768 /Ff 65536 /H/N /BS << /W 0 >> 
/Rect [417.169 745.106 451.341 754.196]

So it looks like a merged Field and Annot dictionary...Aren't fields supposed to belong to Forms? I don't find the /T entry anywhere, so I don't know that the (tooltip zref@1) means
Comment 4 Albert Astals Cid 2018-03-04 19:41:27 UTC
No, AnnotWidgets can also be standalone, see 
   } else if(!strcmp(typeName, "Widget")) { 
in Annot.cc

but it's true we don't see to support Widgets that don't belong to Forms very well

"(tooltip zref@1)" means nothing, what you're interested in is the TU field that which we're not parsing in AnnotWidget::initialize.

Basically this "tooltip" is implemented as an invisible button, kind of a hack if you ask me, but yeah we should try to support them.
Comment 5 GitLab Migration User 2018-08-20 21:35:46 UTC
-- GitLab Migration Automatic Message --

This bug has been migrated to freedesktop.org's GitLab instance and has been closed from further activity.

You can subscribe and participate further through the new bug through this link to our GitLab instance: https://gitlab.freedesktop.org/poppler/poppler/issues/34.

Use of freedesktop.org services, including Bugzilla, is subject to our Code of Conduct. How we collect and use information is described in our Privacy Policy.