sumatrapdfreader / sumatrapdf

SumatraPDF reader
http://www.sumatrapdfreader.org
GNU General Public License v3.0
13.55k stars 1.72k forks source link

PDF annotation popup tooltips do not show up #2083

Open tobidelbruck opened 3 years ago

tobidelbruck commented 3 years ago

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 commented 3 years ago

@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 commented 3 years ago

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

tobidelbruck commented 3 years ago

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 commented 2 years ago

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 commented 2 years ago

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 commented 2 years ago

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 commented 2 years ago

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 commented 2 years ago

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 commented 2 years ago

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: https://github.com/mozilla/pdf.js/pull/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 commented 1 year ago

Similar to https://github.com/sumatrapdfreader/sumatrapdf/issues/2391 image