https://bugs.kde.org/show_bug.cgi?id=388458
Bug ID: 388458 Summary: Wrong size of rectangles around annotation icons (e.g. popup note) for PDF documents Product: okular Version: 1.3.0 Platform: Compiled Sources OS: Linux Status: UNCONFIRMED Severity: normal Priority: NOR Component: PDF backend Assignee: okular-de...@kde.org Reporter: haxti...@posteo.de Target Milestone: --- This is reproducible with almost any PDF document. If you left click on an annotation icon, or while moving the icon around with the mouse, rectangles are drawn around the icon. These rectangles are too big or too small in most cases. How, and how much they misfits depends on PDF page size and on screen DPI. Only in rare cases the rectangle fits exactly with the icon rendered by Poppler. The problem is closely related to https://bugs.kde.org/show_bug.cgi?id=387639. I filed a second bug do describe the PDF specific part of the issue, while #387639 describes the hidpi specific part. Here is a summary for why this happens: -Okulars PickPointEngine creates linked TextAnnotations with a hardcoded width of 0.03 (a normalized value, where 1 means full page width) [1] -Poppler ignores the size right away and forces it to hardcoded 24x24 pts == 0.33x0.33 inch [2] -to draw the rectangle, Okular denormalizes the value 0.03 from above to page width in screen pixels [3], [4] -therefore the rectangle size depends on current DPI and PDF page size in pts, while the icon rendered by poppler is independent from both I'll share a patch on Phabricator soon which fixes the bug for me, and probably fixes #387639 too (can't test the latter due to lacking hidpi setup). Yet another part of the issue is that Poppler silently ignores what applications set in Poppler::Annotation::setBoundary. This should IMHO get fixed at Poppler side, or at least should be clarified why forcing 24x24 pts was necessary. We can only work around it in Okular. [1] https://cgit.kde.org/okular.git/tree/ui/pageviewannotator.cpp?h=Applications/17.12#n213 [2] https://cgit.freedesktop.org/poppler/poppler/tree/poppler/Annot.cc?h=poppler-0.62.0#n2469 [3] https://cgit.kde.org/okular.git/tree/ui/pagepainter.cpp?h=Applications/17.12#n805 [4] https://cgit.kde.org/okular.git/tree/ui/pageviewmouseannotation.cpp?h=Applications/17.12#n271 -- You are receiving this mail because: You are watching all bug changes.