Skip to content

PDF annotation popup tooltips do not show up #2083

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
tobidelbruck opened this issue Aug 1, 2021 · 10 comments
Open

PDF annotation popup tooltips do not show up #2083

tobidelbruck opened this issue Aug 1, 2021 · 10 comments

Comments

@tobidelbruck
Copy link

SumatraPDF no longer shows PDF annotation popup tooltips that is expected to pop up as they do in Adobe Reader or Acrobat. SumatraPDF version 3.0.0 showed them fine.

SumatraPDF v3.3.3 does not show the tip which Acrobat shows when hovering over "BRAM" as seen in screen shot below

2021-08-01_102134

See https://www.overleaf.com/read/fyvbnxpwwjss for overleaf project that generates a test PDF with embedded popup tooltip.

The resulting PDF is at https://www.dropbox.com/s/sc2jacft6huva3d/acronyms_with_tooltip_test.pdf?dl=0

@GitHubRulesOK
Copy link
Collaborator

GitHubRulesOK commented Aug 1, 2021

@kjk
Note these files are built in LaTeX via several methods thus there can be variable results, in this case it starts
\include{acronyms}
which preloads
\usepackage[draft]{pdfcomment}

Another more common related package is "HyperRef" which builds internal Hyperlinks that are more frequently encountered and a separate issue.

Above quoted compiled sample is
acronyms_with_tooltip_test.pdf

Which sometimes targets a tooltip in Acrobat 9 (in above sample about 30% worked in my Acrobat Reader)
But in MuPDF some are not visibly processed (above sample shows none as valid screen annotation but the ones that do work in Acrobat 9 are detected but not shown as considered invalid) and in other cases where detected as valid only shows a floating blank box for those usage cases see
tooltip_test.pdf
Where only 5 are detected as empty screen annotations (non visible content)

thus Acrobat can consider some as invalid and MuPDF can see them in variable ways but overall MuPDF does not handle valid ones well.

@kjk
Copy link
Member

kjk commented Aug 2, 2021

Yeah, for tooltip_test.pdf, mupdf complains that "cannot create appearance stream for Screen annotations".

@tobidelbruck
Copy link
Author

Thanks. Please note that the acronyms.tex "package" that I hacked together only puts popup tooltips on 2nd or later use of the acronym. Not the first one. In acrobat DC 2021.005.20060 all tips in acronyms_with_tooltip_test.pdf show properly.

@tobidelbruck
Copy link
Author

Still open in 3.4. Please let me know how/if I can help. What is MuPDF? How can I help revert the regression from 3.0 to later versions? 3.0 still works fine for these popup annotations on acronyms, as does latest Acrobat DC Reader and editor.

@kjk
Copy link
Member

kjk commented Dec 11, 2021

https://mupdf.com/ is the code sumatra uses for PDF handling.

They have a simple windows viewer (https://mupdf.com/releases/index.html) you can use to double-check if a given issue is specific to Sumatra or is an issue with mupdf itself.

If it happens in mupdf, it helps if you report the bug to them https://bugs.ghostscript.com/

If they fix it, we'll inherit the fix.

@5inf
Copy link

5inf commented Jan 7, 2022

The LaTeX pdfcomment package [1] has a good example document [2] which can be used for testing. None of the tooltips in the example document work at the moment in SumatraPDF 3.3.3. They however work fine in 3.0.

Also the tooltips created by the cooltooltips package [3], which seem to be different again because they work in e.g. in the included PDF viewer of TeXstudio, are not working in 3.3.3 and 3.0.

mupdf-1.19.0 behaves exactly as SumatraPDF 3.3.3.

I have however not found a version of mupdf that behaves like SumatraPDF3.0.

[1] https://www.ctan.org/pkg/pdfcomment
[2] https://ftp.rrzn.uni-hannover.de/pub/mirror/tex-archive/macros/latex/contrib/pdfcomment/doc/pdfcomment_de.pdf
[3] https://www.ctan.org/pkg/cooltooltips

@tobidelbruck
Copy link
Author

The LaTeX pdfcomment package [1] has a good example document [2] which can be used for testing. None of the tooltips in the example document work at the moment in SumatraPDF 3.3.3. They however work fine in 3.0.

Also the tooltips created by the cooltooltips package [3], which seem to be different again because they work in e.g. in the included PDF viewer of TeXstudio, are not working in 3.3.3 and 3.0.

mupdf-1.19.0 behaves exactly as SumatraPDF 3.3.3.

I have however not found a version of mupdf that behaves like SumatraPDF3.0.

[1] https://www.ctan.org/pkg/pdfcomment [2] https://ftp.rrzn.uni-hannover.de/pub/mirror/tex-archive/macros/latex/contrib/pdfcomment/doc/pdfcomment_de.pdf [3] https://www.ctan.org/pkg/cooltooltips

Same for me; I tried downloading all versions of muPDF from 1.19.0 back to 1.9a from https://mupdf.com/releases/index.html and none of them show any popup tooltip with hover or rollover of the annotation. So I don't know how SumatraPDF3.0.0 could show the tips. The latest version of muPDF when built in WSL2 and displayed with GWSL x-server on windows 10 not show any hover/rollover tooltip popups in any of these versions.
However I do see some big code edits in https://github.com/ArtifexSoftware/mupdf/blob/master/source/pdf/pdf-form.c (the acronyms are highlighted as forms in muPDF)

@tobidelbruck
Copy link
Author

Note, could be related, overleaf had a problem with white boxes showing for these tooltip acronyms until they released a fix yesterday. Now the popups work properly again in the integrated overleaf PDF viewer.

@tobidelbruck
Copy link
Author

The overleaf fix is not related: I got this email response from overleaf team; it might provide some clue but it appears they use the Mozilla PDF rendering engine:

On Overleaf, this was related to changes/bugs in pdf.js: mozilla/pdf.js#14247

We're not that familiar with muPDF, but if it uses its own engine and unrelated to pdf.js, then the issue in SumatraPDF is likely due to a different cause. I'm afraid we're unable to delve further into SumatraPDF; sorry about this!

@GitHubRulesOK
Copy link
Collaborator

Similar to #2391
image

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

4 participants