SUMMARY Saving reviews doesn't work 100% correct - the review object is being saved and shown in pdf viewers review panel (correct), but the visual representation of review gets corrupted (the highlight color/line/etc is not shown on actual pdf). Different viewers exhibit different behaviors STEPS TO REPRODUCE 1. Create highlight review 2. Create freehand line 3. Save document 4. Open in firefox/chrome/foxit/zathura pdf viewer OBSERVED RESULT chrome, okular, zathura - shows 1 highlight, 1 line (correct!) firefox - shows 0 highlight, 0 line foxit - shows 1 highlight, 0 line (always 1 behind) EXPECTED RESULT All viewers should show 1 highlight and 1 line: visible in pdf reviews (this works) actually drawn in pdf (this doesn't) SOFTWARE/OS VERSIONS Linux/KDE Plasma: KDE neon 18.04 KDE Plasma Version: 5.16.4 KDE Frameworks Version: 5.60 Qt Version: 5.12.3 ADDITIONAL INFORMATION
We're going to need a file you have problems with and exact description of the annotations you make
Created attachment 121991 [details] annotated pdf Attached example pdf. There seems to be additional problem - the inline note is never shown in chrome pdf viewer (additional to the behavior I described before). There should be visible 4 annotations, will list them in creation order: 1. Red marking of text - "meters for Open" 2. Inline note with text - "This is second annotation I made" 3. Pop up note 4. Green line
Created attachment 121992 [details] Screenshot of pdf viewers Added screenshots of few different pdf viewers
Given that Adobe renders the file the same way Okular does https://i.imgur.com/6rtYu1Q.png I wonder why you think this is an Okular bug and not an okular in firefox/chrome/foxit/zathura pdf viewer ?
I am not familiar with pdf standard but I do imagine the analogy to html should stand - user/program can craft non conformant html markup code and browsers choose to show it correctly or error out. In this situation there are multiple viewers showing different results - this does seem that annotations could be "crafted" better or that most pdf viewers are meh on standards. In that case is there any combination where annotation is shown correctly in all viewers?
So you don't know if it's a bug. Unless you can prove we're doing it wrong i'll say we're doing it right if Adobe Reader shows the things we create.
I do not understand how adobe reader is relevant here? Is it officially declared as gold standard? More over it is the only one of many viewers which shows 100% of annotations as okular. I do not have (right now) technical knowledge needed to debg this issue - my contribution was to document the issue and do testing or other non technical work.
(In reply to tutonis from comment #7) > Is it officially declared as gold standard? It's the implementation of the guys that wrote the spec, so kind of yes. > I do not have (right now) technical knowledge needed to debg this issue - my contribution was to document the issue and do testing or other non technical work. My suggestion is you attach that pdf to the bug trackers of the other pdf viewers and say "look, it works on Adobe Reader, so it should work for you too" and see what they say
(In reply to Albert Astals Cid from comment #8) > My suggestion is you attach that pdf to the bug trackers of the other pdf > viewers and say "look, it works on Adobe Reader, so it should work for you > too" and see what they say They are aware, see below. Issue happens because the FreeText annotation in the attached PDF has no AP (appearance stream). Firefox uses PDF.js, they have an issue with FreeText without AP: https://github.com/mozilla/pdf.js/issues/6810 Chrome uses PDFium, seems they have issue with FreeText in general: https://bugs.chromium.org/p/pdfium/issues/detail?id=569 Okular, Evince (and Zathura, depending on configuration) use poppler. Poppler displays correctly without AP, but can't store AP when saving the PDF. Adobe displays (copes without AP) and writes (saves AP) correctly. PDF 1.7 says AP is optional. I.e., readers must be able to display the annotation anyway. PDF 2.0 says AP is mandatory. I.e., writers must be able to generate and save AP along with the annotation. So no use in blaming some party, all could do better. Solving is just not that easy and needs an extra portion of spare (or sponsored) time. Now that PDF 2.0 has made AP mandatory, I believe duty has shifted somewhat to poppler side. I'd suggest to close this one and open an issue at poppler side?
It is true that poppler should add the AP when it creates a PDF 2.0 file. On the other hand, that does not solve the problem with documents which declares an older version of the PDF format, where the AP is not mandatory. In that case the viewers should still be fixed. The document that you attached is a PDF 1.4, for example.
read Tobias' comment, clearly not a bug in Okular