Bug 405462 - wrong display of annotation
Summary: wrong display of annotation
Status: REPORTED
Alias: None
Product: okular
Classification: Applications
Component: PDF backend (show other bugs)
Version: 1.3.3
Platform: Ubuntu Linux
: NOR major
Target Milestone: ---
Assignee: Okular developers
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2019-03-14 02:11 UTC by Ferdinand Gassauer
Modified: 2019-03-17 20:40 UTC (History)
4 users (show)

See Also:
Latest Commit:
Version Fixed In:
Sentry Crash Report:


Attachments
difference between display of okular and adobe (39.54 KB, image/png)
2019-03-14 02:11 UTC, Ferdinand Gassauer
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Ferdinand Gassauer 2019-03-14 02:11:51 UTC
Created attachment 118789 [details]
difference between display of okular and adobe

SUMMARY

Open a pdf file from a business partner 
okular displays "DRAFT" (over "Sign here")
acoread displays "Sign here"

I can provide the file on demand

STEPS TO REPRODUCE
1. 
2. 
3. 

OBSERVED RESULT


EXPECTED RESULT


SOFTWARE/OS VERSIONS
Ubuntu 18.04 
KDE Frameworks 5.44.0
Qt 5.9.5 (built against 5.9.5)
The xcb windowing system
okular: version 1.3.3

ADDITIONAL INFORMATION
Comment 1 Oliver Sander 2019-03-14 10:00:37 UTC
That's likely to be a poppler bug (poppler is the library used by Okular for pdf rendering).  Can you try to reproduce the problem with the pdftocairo tool?  If that shows the error too, then please open a bug report in the poppler bug tracker, and post the link here for future reference.
Comment 2 Ferdinand Gassauer 2019-03-14 11:34:44 UTC
Thanks for the quick answer.
pdftocairo -pdf y.pdf x.pdf 
produces a file x.pdf which shows the correct result once opened with okular wheras y.pdf shows the wrong result
Comment 3 Tobias Deiminger 2019-03-14 12:29:07 UTC
(In reply to Ferdinand Gassauer from comment #2)
> Thanks for the quick answer.
> pdftocairo -pdf y.pdf x.pdf 
> produces a file x.pdf which shows the correct result once opened with okular
> wheras y.pdf shows the wrong result
This is related to https://bugs.kde.org/show_bug.cgi?id=401999.

Okular currently works so that it draws a stamp icon *on top of* a page rendered by poppler. The icon gets selected by annotation meta data (probably /Name = Draft, in your case). The approach causes trouble if a PDF contains a pregenerated appearance for the stamp along with its meta data. The appearance is drawn by poppler, and the icon is drawn by Okular on top of it.

Albert already suggested a solution which should work here too:
> Actually fixing this pdf "the right way" is not hard,
> we just need https://paste.kde.org/pk6wzgiqs in poppler
> and then a "backendPaintsStamp" or similar in the
> okular core annotation.
Comment 4 Nate Graham 2019-03-16 21:48:22 UTC
(In reply to Tobias Deiminger from comment #3)
> Albert already suggested a solution which should work here too:
> > Actually fixing this pdf "the right way" is not hard,
> > we just need https://paste.kde.org/pk6wzgiqs in poppler
> > and then a "backendPaintsStamp" or similar in the
> > okular core annotation.
Did that ever get into Popper?
Comment 5 Albert Astals Cid 2019-03-17 20:40:50 UTC
Don't think so, but honestly don't remember what was there.