Summary: | highlight annotation not carried over to pdfjs | ||
---|---|---|---|
Product: | [Applications] okular | Reporter: | ghavamikia |
Component: | PDF backend | Assignee: | Okular developers <okular-devel> |
Status: | RESOLVED UPSTREAM | ||
Severity: | normal | CC: | aacid, haxtibal, nate |
Priority: | NOR | ||
Version: | 1.8.2 | ||
Target Milestone: | --- | ||
Platform: | Other | ||
OS: | Linux | ||
Latest Commit: | Version Fixed In: | ||
Attachments: |
1
1 2 3 4 |
Description
ghavamikia
2019-11-04 20:20:37 UTC
From your description I'm quite sure this is the same as already explained in bug 410642 comment 9. You may want to attach document snapshots here from before and after the "magic" repair operation by Foxit. I'd assume Foxit added an AP entry, which is kind of pregenerated graphics representing the note, unburdening PDF.js from generating it at their side. Created attachment 123758 [details]
1
Created attachment 123759 [details]
1
Created attachment 123760 [details]
2
Created attachment 123761 [details]
3
Created attachment 123762 [details]
4
Created attachment 123763 [details]
pdf
pls ignore 1st picture, (it's same as 4, I don't know how to remove it) so i took exactly the same steps as before... and got a completely different this, I couldn't reproduce the same error, but got an even worse one! opened and saved annotation in okular (see screenshot) opened same in firefox.. as before cant see the colour but can see the note on hovering (cursor missing on screenshot) (see screenshot) opened same doc in foxit and made new annotation and saved (see screenshot) opened this is firefox... now there nothing at all.... opened same in okular... now okular highlight is missing! (see screenshot) for what it's worth it opens the same in adobe, okular note missing.. so I've attached the pdf... I worry if I do this again in 24 hours I'll get yet another result, I woish I had sent you the pdf and screenshots from the original bug report now... (In reply to ghavamikia from comment #8) > opened same doc in foxit and made new annotation and saved (see screenshot) > opened this is firefox... now there nothing at all.... > opened same in okular... now okular highlight is missing! (see screenshot) > for what it's worth it opens the same in adobe, okular note missing.. > so I've attached the pdf... Uncompressing object streams reveals the following: - 1st page annotation dictionary (it's something like a TOC for annotations) contains a "null object" where there ought be an indirect reference to your "okular note" - and, in the whole document there's no occurence of an annotation object with /Contents (okular note) It quite clearly indicates Foxit has not only made your "okular note" invisible, but it actually deleted it completely. The first issue (newly created Okular highlights not visible in PDF.js) is very likely because poppler doesn't write AP, and PDF.js fails to display something without AP. It's a known issue in both projects. > I worry if I do this again in 24 hours I'll get yet another result, I woish > I had sent you the pdf and screenshots from the original bug report now... If you're able to reproduce the "deleted annotation" behavior, you should file a bug report to Foxit. I'd suggest to close the Okular bug here. - Okular can't do anything about Foxit deleting annotations - Okular can't do anything about AP. That's up to poppler. I think we're aware over there, shall we open a dedicated poppler issue for it anyway? Thank you for your time it's much appreciated. I agree with your plans, except the conclusion about foxit deleting things, firstly because it persists in foxit, and secondly because it opens in mupdf which I downloaded yesterday for a try.... anyway I do appreciate your input since I have no idea about programming and having used okular over the last 8 years I appreciate how much it's developed, I hope it continues! (In reply to ghavamikia from comment #10) > it opens in mupdf You're right, I can confirm mupdf shows the highlight when opening your unmodified attachment 123763 [details]. I looked a bit deeper what's going on with object 74 0 (that's the ID of the annotation object "okular note"): - mutool: page 1 annots = [ 74 0 R 78 0 R 80 0 R 81 0 R 82 0 R 87 0 R ] mutool show l3project.pdf 74 74 0 obj << /Contents <FEFF006F006B0075006C006100720020006E006F00740065> /Type /Annot /Subtype /Highlight ... >> endobj - poppler (via small debug program): document->getPage(1)->getAnnotsObject().print(); [74 0 R 78 0 R 80 0 R 81 0 R 82 0 R 87 0 R] document->getXRef()->fetch(74, 0).print(); null - qpdf: qpdf --show-object=74 l3project.pdf null mutool fetches object 74 0 and returns annotation content. poppler has the object referenced in annotation array, but can't fetch it, returns null object. qpdf also can't fetch it, returns null object. That's actually interesting and might be something we want to fix or workaround in poppler. I'll investigate further. Thank you. if I find similar incongruencies in the future I will post them anywhere in particular? (In reply to ghavamikia from comment #12) > Thank you. > if I find similar incongruencies in the future I will post them anywhere in > particular? PDF parsing and rendering issues can directly go to poppler: https://gitlab.freedesktop.org/poppler/poppler/issues But don't worry, reporting to Okular in first place is absolutely fine. Both projects have a close relation and people behind are partially the same. Anyway thanks for your reports :) i'm closing this as upstream since nothing okular does here is wrong, if anything at all is wrong it'd be in poppler as Tobias mentioned. Tobias i take you're on top of this? (In reply to Albert Astals Cid from comment #14) > i'm closing this as upstream since nothing okular does here is wrong, if > anything at all is wrong it'd be in poppler as Tobias mentioned. > > Tobias i take you're on top of this? Yep, created https://gitlab.freedesktop.org/poppler/poppler/issues/837 and https://gitlab.freedesktop.org/poppler/poppler/issues/839 to keep track. @ghavamikia: If you can reproduce the steps that lead to "okular note" note even shown in Okular, it would be nice to give more details and snapshots of the PDF file on its way breaking bad. attachment 123763 [details] is in an inconsistent state wrt. generation numbers, whatever software caused it should get its own bug report. |