Created attachment 138592 [details] Annotations shown in Okular for Window. On left, annotation done with Xodo with same stylus and same device. SUMMARY In Windows 10 (Okular version 20.12.2) freehand annotations with stylus are jagged. STEPS TO REPRODUCE 1. Open PDF in Okular 2. Click on freehand annotation and use stylus OBSERVED RESULT - When the annotation is taken, it looks very jagged. - That same annotation, displayed in another PDF viewer, does not look as jagged, but it is more jagged than annotations done with other apps (e.g., Xodo or Adobe Acrobat Reader DC). - Displaying that PDF in Okular for Linux also shows the freehand annotations as jagged. EXPECTED RESULT - Annotation is reasonably smooth. SOFTWARE/OS VERSIONS Windows: Windows 10 macOS: Linux/KDE Plasma: (available in About System) KDE Plasma Version: KDE Frameworks Version: Qt Version: ADDITIONAL INFORMATION - This might be related to https://bugs.kde.org/show_bug.cgi?id=410723 ? But that is solved.
Created attachment 138593 [details] Annotations shown in Xodo (same device as previous screenshot). Annotations done in Okular look more jagged, but less than when they are shown in Okular itself.
I think that is just your stylus, and other applications realize (or not) that your stylus is jagging and apply a smoothing algorithm to the annotation. Bug 410723 was caused by processing both stylus and mouse cursor events, which were systematically a bit off, which caused the caracteristic comb-like jitter. In your case, the jitter looks pretty random. Can you please make a screenshot of this jitter at a high zoom scale?
Dear Bug Submitter, This bug has been in NEEDSINFO status with no change for at least 15 days. Please provide the requested information as soon as possible and set the bug status as REPORTED. Due to regular bug tracker maintenance, if the bug is still in NEEDSINFO status with no change in 30 days the bug will be closed as RESOLVED > WORKSFORME due to lack of needed information. For more information about our bug triaging procedures please read the wiki located here: https://community.kde.org/Guidelines_and_HOWTOs/Bug_triaging If you have already provided the requested information, please mark the bug as REPORTED so that the KDE team knows that the bug is ready to be confirmed. Thank you for helping us make KDE software even better for everyone!
Created attachment 139019 [details] screecapture, high zoom, 1
Created attachment 139020 [details] screencapture, high zoom, 2
(In reply to David Hurka from comment #2) > I think that is just your stylus, and other applications realize (or not) > that your stylus is jagging and apply a smoothing algorithm to the > annotation. > > Bug 410723 was caused by processing both stylus and mouse cursor events, > which were systematically a bit off, which caused the caracteristic > comb-like jitter. In your case, the jitter looks pretty random. Can you > please make a screenshot of this jitter at a high zoom scale? Added two screenshots at high zoom from Okular. Unfortunately, I do not (yet) have another stylus to test. Will try to get another one, and report.
Thanks. I don’t think these screenshots indicate a systematic jitter, but just the natural jitter of a physical object. After reading this more carefully: > - That same annotation, displayed in another PDF viewer, does not > look as jagged, but it is more jagged than annotations done > with other apps (e.g., Xodo or Adobe Acrobat Reader DC). I think that Poppler (Okular’s backend) renders the annotation with miter-join line style, while other renderers use round-join. Round-join can not make spikes. > but it is more jagged than annotations done > with other apps (e.g., Xodo or Adobe Acrobat Reader DC). Other apps maybe ignore points that are very close to each other, which additionally reduces jitter. You can test that by slowly drawing a diagonal line with the mouse. My Okular creates a staircase line instead of one smooth diagonal line, which means that all points of my mouse movement are included. (One pixel up, one pixel right, one pixel up, ...)
Thanks. I haven't been able to test with another stylus, but things are OK (much smoother) with the mouse, so I guess this is a stylus issue as you suggested. I guess we can close this, so I am setting status to "resolved", "not a bug". Apologies for the noise with this report. (In reply to David Hurka from comment #7) > Thanks. I don’t think these screenshots indicate a systematic jitter, but > just the natural jitter of a physical object. > > After reading this more carefully: > > > - That same annotation, displayed in another PDF viewer, does not > > look as jagged, but it is more jagged than annotations done > > with other apps (e.g., Xodo or Adobe Acrobat Reader DC). > > I think that Poppler (Okular’s backend) renders the annotation with > miter-join line style, while other renderers use round-join. Round-join can > not make spikes. > > > but it is more jagged than annotations done > > with other apps (e.g., Xodo or Adobe Acrobat Reader DC). > > Other apps maybe ignore points that are very close to each other, which > additionally reduces jitter. > > You can test that by slowly drawing a diagonal line with the mouse. My > Okular creates a staircase line instead of one smooth diagonal line, which > means that all points of my mouse movement are included. (One pixel up, one > pixel right, one pixel up, ...)
I didn’t mean that the problem is on your side or with your stylus. I consider this a bug of Okular. The tablet events in Qt are intended for higher precision, so we should be able to process this higher precision. No need to worry about making noise. Discussing a bug report is fine. :)
I see the same on Ubuntu 20.04, Okular 19.12.3, Genius EasyPen F610E. Other apps (GIMP, PowerPoint) render smooth lines. Can I just take two lines to GUSH about Okular? The annotation features are best in class and life changing. I take notes on PDFs like I did books. Thanks devs!
:) Thanks! (And I do second gbell's comment: Okular's annotation features and general design are best in class). (In reply to David Hurka from comment #9) > I didn’t mean that the problem is on your side or with your stylus. I > consider this a bug of Okular. The tablet events in Qt are intended for > higher precision, so we should be able to process this higher precision. > > No need to worry about making noise. Discussing a bug report is fine. :)
The extensive annotation features of Okular are differentiating it from the other PDF viewers. Nevertheless, note-taking is impaired by : - the jaggedness when handwriting (using an EMR stylus on a tablet), an issue which does not occur with e.g. Xournal++ on the same hardware. - the absolute value of the "Width" parameter, independent of the zoom level. One would expect to reduce jaggedness by zooming in, writing text, and zooming out, but line width and jaggies are applied independent of the zoom level. (see attached screenshots)
Created attachment 141384 [details] Screenshot of freehand annotation, stylus-handwritten text
Created attachment 141385 [details] Screenshot of freehand annotation, stylus-handwritten text (400% zoom)
Created attachment 141386 [details] Screenshot of freehand annotation, mouse-drawn curves (zoomed) To provide some additional information, illustrating the issue from another POV (pun intended) : These curves ae drawn on PC using a mouse. Notice that, due to lack of interpolation (?), curvature is lost (this would render any handwritten text more or less illegible).
*** Bug 447651 has been marked as a duplicate of this bug. ***
Probably related to bug 456225, Okular doesn't use interpolation for text and images.