[okular] [Bug 353401] Feature requst: "typewriter" annotation tool
https://bugs.kde.org/show_bug.cgi?id=353401 Christoph Feck changed: What|Removed |Added CC||scroogemcd...@web.de --- Comment #30 from Christoph Feck --- *** Bug 397991 has been marked as a duplicate of this bug. *** -- You are receiving this mail because: You are the assignee for the bug.
[okular] [Bug 353401] Feature requst: "typewriter" annotation tool
https://bugs.kde.org/show_bug.cgi?id=353401 Nate Graham changed: What|Removed |Added Version Fixed In||18.12.0 CC||n...@kde.org -- You are receiving this mail because: You are the assignee for the bug.
[okular] [Bug 353401] Feature requst: "typewriter" annotation tool
https://bugs.kde.org/show_bug.cgi?id=353401 Tobias Deiminger changed: What|Removed |Added Latest Commit||https://commits.kde.org/oku ||lar/6dd7cf662d2335c035e7238 ||9978f32ee43dc94f2 Resolution|--- |FIXED Status|REPORTED|RESOLVED --- Comment #29 from Tobias Deiminger --- Git commit 6dd7cf662d2335c035e72389978f32ee43dc94f2 by Tobias Deiminger, on behalf of Dileep Sankhla. Committed on 25/09/2018 at 20:47. Pushed by tobiasdeiminger into branch 'master'. Add typewriter annotation tool Summary: Typewriter is originally specified by the PDF reference as special FreeText annotation, where Intent=FreeTextTypewriter. It features opaque letters on transparent background, so that users can fill non interactive forms. Herewith typewriter is implemented natively for PDF, and there's also an Okular specific implementation for other document types. The added tool reuses the inline note UI. This work was done during GSoC 2018. See https://community.kde.org/GSoC/2018/StatusReports/DileepSankhla for details. Test Plan: - okularpartrc is generated (if not yet existing) with typewriter as 10th tool - typewriter tool is also available in Annotation Tools -> Add, Typ "Typewriter" - selecting the tool and left click into document opens inline note input dialog - finishing creates an annotation similar to inline note, but with transparent background - saving into PDF results in /Subtype FreeText /IT /FreeTextTypeWriter - saving typewriter into archive stores color with alpha channel = 0x00 - opening annotated archive works, if archive was created with old Okular, and opened in patched Okular - opening annotated archive works, if archive was created with patched Okular, and opened in old Okular Reviewers: sander Reviewed By: sander Subscribers: ngraham, sander, okular-devel Tags: #okular Differential Revision: https://phabricator.kde.org/D15204 M +34 -0conf/editannottooldialog.cpp M +2-1conf/editannottooldialog.h M +6-1ui/annotationpropertiesdialog.cpp M +122 -74 ui/annotationwidgets.cpp M +28 -8ui/annotationwidgets.h M +9-1ui/annotwindow.cpp M +2-0ui/data/CMakeLists.txt A +---ui/data/sources/tool-typewriter-okular-colorizable.svgz A +---ui/data/tool-typewriter-okular-colorizable.png A +---ui/data/tool-typewriter-okular-coloriza...@2x.png M +13 -8ui/data/tools.xml M +6-1ui/guiutils.cpp M +1-1ui/pagepainter.cpp M +65 -44 ui/pageviewannotator.cpp https://commits.kde.org/okular/6dd7cf662d2335c035e72389978f32ee43dc94f2 -- You are receiving this mail because: You are the assignee for the bug.
[okular] [Bug 353401] Feature requst: "typewriter" annotation tool
https://bugs.kde.org/show_bug.cgi?id=353401 --- Comment #28 from Dileep Sankhla--- I'm working on this feature request as a GSoC 2018 student and you can find my project here: https://summerofcode.withgoogle.com/projects/#6053164340477952 and my proposal here: https://docs.google.com/document/d/1STBOz7Qcw1Wj6qB7XBg9er-wbsVx3g7Sw945WcHJfWU/edit?usp=sharing Comments are always welcome and this thread will be updated regularly. -- You are receiving this mail because: You are the assignee for the bug.
[okular] [Bug 353401] Feature requst: "typewriter" annotation tool
https://bugs.kde.org/show_bug.cgi?id=353401 Simon Andricchanged: What|Removed |Added CC||simonandr...@gmail.com -- You are receiving this mail because: You are the assignee for the bug.
[okular] [Bug 353401] Feature requst: "typewriter" annotation tool
https://bugs.kde.org/show_bug.cgi?id=353401 --- Comment #27 from Tobias Deiminger--- > Seems like an interesting idea to explore, just remember that you're going > to need more layers of abstraction since okular core doesn't know anything > about poppler Yes, and I have to relate myself a bit. As this feature request is candidate for a GSoC project, it's better to not put too much experimental ideas in here. Forget about my generator rendered widgets for now. Such exploration still can be done later, maybe together with bug 358061. Implementing an UI similar to existing inline notes will be good for a start. There we use QInputDialog::getMultiLineText for initial input, AnnotWindow for editing, and let the generator render the annotation along with the page (which avoids visual inconsistencies too). -- You are receiving this mail because: You are the assignee for the bug.
[okular] [Bug 353401] Feature requst: "typewriter" annotation tool
https://bugs.kde.org/show_bug.cgi?id=353401 Albert Astals Cidchanged: What|Removed |Added CC||aa...@kde.org --- Comment #26 from Albert Astals Cid --- (In reply to Tobias Deiminger from comment #25) > To avoid those inconsistencies, I'd like to promote the idea of widgets that > have a FormWidget-like PageView integration, but use generator/poppler as > the one and only render engine. Seems like an interesting idea to explore, just remember that you're going to need more layers of abstraction since okular core doesn't know anything about poppler -- You are receiving this mail because: You are the assignee for the bug.
[okular] [Bug 353401] Feature requst: "typewriter" annotation tool
https://bugs.kde.org/show_bug.cgi?id=353401 --- Comment #25 from Tobias Deiminger--- > TypeWriter and Inline note need a better WYSIWIG than a popup widget Full ack. But that's not all, imho. The attachment 111769 and attachment 111770 make clear what I'm afraid of could happen to our typewriter/inline note feature if we go the easy way and just used a KTextEdit (even if it sticked and scrolled with the page). The screenshots are taken with PDF form fields from [0]. Form fields are user editable elements that scroll with the document, and nicely integrate with PageView via FormWidgetIface and QEvent. As thus, a typewriter feature could probably learn interesting things from FormWidget implementation. However FormWidgets have one weakness: They render content on their own by using KTextEdit, QRadioButton and so on - and overlay the page rendered by poppler. Using two different rendering engines with different settings for same purpose, namely Qt vs. poppler, evokes visual inconsistencies. Just see screenshots, or try it yourself. To avoid those inconsistencies, I'd like to promote the idea of widgets that have a FormWidget-like PageView integration, but use generator/poppler as the one and only render engine. @all: What do you think of that idea? [0] http://www.windjack.com/downLoads/WJAnnotExample1.pdf -- You are receiving this mail because: You are the assignee for the bug.
[okular] [Bug 353401] Feature requst: "typewriter" annotation tool
https://bugs.kde.org/show_bug.cgi?id=353401 --- Comment #24 from Tobias Deiminger--- Created attachment 111770 --> https://bugs.kde.org/attachment.cgi?id=111770=edit Qt vs. poppler - TextAreaEdit Real world example where Qt-rendered TextAreaEdit generates different visual representation compared to poppler-rendered print out of the same field. -- You are receiving this mail because: You are the assignee for the bug.
[okular] [Bug 353401] Feature requst: "typewriter" annotation tool
https://bugs.kde.org/show_bug.cgi?id=353401 --- Comment #23 from Tobias Deiminger--- Created attachment 111769 --> https://bugs.kde.org/attachment.cgi?id=111769=edit QT vs. poppler - RadioButtonEdit form field Real world example where Qt-rendered radio button overlays poppler-rendered page. -- You are receiving this mail because: You are the assignee for the bug.
[okular] [Bug 353401] Feature requst: "typewriter" annotation tool
https://bugs.kde.org/show_bug.cgi?id=353401 --- Comment #22 from Simone Gaiarin--- I cannot comment about the technicalities of poppler, but I agree that both TypeWriter and Inline note need a better WYSIWIG than a popup widget. -- You are receiving this mail because: You are the assignee for the bug.
[okular] [Bug 353401] Feature requst: "typewriter" annotation tool
https://bugs.kde.org/show_bug.cgi?id=353401 --- Comment #21 from Tobias Deiminger--- > typewriter tool is to write text without any background anywhere (e.g to fill > forms) > inline notes are to add post-its like notes in the document (with a > background) Yeah, nice sum up, thanks! Can we agree that both are for different user intent, but are technically almost the same? I mean, both are FreeText annotations under the hood (one with IT=FreeText, the other one with IT=FreeTextTypeWriter). And both share the problem, that if we care for true WYSIWIG live editing we can't simply use a KTextEdit widget, because it could only approximate what we get in the end. We'd need something similar, but generator/poppler has to do the rendering. Such generator-rendered widgets would be a new concept in Okular, and they would need finer grained interaction of Okular <=> Poppler than what's currently possible. Patch [0] is a start, but may still not be enough. Do we care? [0] https://bugs.freedesktop.org/show_bug.cgi?id=105796 -- You are receiving this mail because: You are the assignee for the bug.
[okular] [Bug 353401] Feature requst: "typewriter" annotation tool
https://bugs.kde.org/show_bug.cgi?id=353401 --- Comment #20 from Simone Gaiarin--- I don't think that bug 358061 is a duplicate. In my opinion the typewriter tool is to write text without any background anywhere in the file (e.g to fill forms), while inline notes are a different tool to add post-its like notes in the document (with a background). Very similar tools but with different purpose. -- You are receiving this mail because: You are the assignee for the bug.
[okular] [Bug 353401] Feature requst: "typewriter" annotation tool
https://bugs.kde.org/show_bug.cgi?id=353401 Tobias Deimingerchanged: What|Removed |Added CC||haxti...@posteo.de --- Comment #19 from Tobias Deiminger --- I guess that what I had in mind here https://bugs.kde.org/show_bug.cgi?id=358061#c2 is actually a kind of typewriter too. Is bug 358061 a duplicate? If so, consider the linked poppler patches there. -- You are receiving this mail because: You are the assignee for the bug.
[okular] [Bug 353401] Feature requst: "typewriter" annotation tool
https://bugs.kde.org/show_bug.cgi?id=353401 Dileep Sankhlachanged: What|Removed |Added CC||sankhla.dilee...@gmail.com --- Comment #18 from Dileep Sankhla --- On Thu, Mar 22, 2018 at 4:13 AM, Tobias Deiminger wrote: Okular already let's you create FreeText annotations. The confusing thing is that they're called "inline notes" in Okulars manual, and they're represented as class TextAnnotation (with m_textType == TextAnnotation::InPlace) in Okular and Popplers QT5 frontend. Under the hood poppler generates a real FreeText annotation: # qt5/src/poppler-annotation.cc Annot* TextAnnotationPrivate::createNativeAnnot(::Page *destPage, DocumentData *doc) { // ... PDFRectangle rect = boundaryToPdfRectangle(boundary, flags); if (textType == TextAnnotation::Linked) { pdfAnnot = new AnnotText(destPage->getDoc(), ); } else { GooString * da = toAppearanceString(textFont); pdfAnnot = new AnnotFreeText(destPage->getDoc(), , da); // Here it is :-) delete da; } // ... } I assume that what really is missing is the FreeTextTypeWriter behavior. You can check the ISO 32000 PDF standard for FreeTextTypeWriter (IT entry of the FreeText object). You can also fire up okular in gdb and convince yourself $ gdb okular (gdb) b AnnotFreeText::AnnotFreeText (gdb) r # load document, create inline note => we hit popplers AnnotFreeText::AnnotFreeText constructor Thread 1 "okular" hit Breakpoint 1, 0x7fffce304220 in AnnotFreeText::AnnotFreeText(PDFDoc*, PDFRectangle*, GooString*)@plt () from /tmp/usr/lib/libpoppler-qt5.so.1 (gdb) bt #0 0x7fffce304220 in AnnotFreeText::AnnotFreeText(PDFDoc*, PDFRectangle*, GooString*)@plt () from /tmp/usr/lib/libpoppler-qt5.so.1 #1 0x7fffce30d689 in Poppler::TextAnnotationPrivate::createNativeAnnot ( this=0x7fffdc00ccb0, destPage=, doc=) at /home/tobias/workspace/OSScontrib/poppler/qt5/src/poppler-annotation.cc:1880 ... backtrace shortened ... -- You are receiving this mail because: You are the assignee for the bug.
[okular] [Bug 353401] Feature requst: "typewriter" annotation tool
https://bugs.kde.org/show_bug.cgi?id=353401 --- Comment #17 from sombrag...@sombragris.org --- Please keep this in mind and consider implementing it as soon as possible. Thanks!! -- You are receiving this mail because: You are the assignee for the bug.
[Okular-devel] [okular] [Bug 353401] Feature requst: "typewriter" annotation tool
https://bugs.kde.org/show_bug.cgi?id=353401 sombrag...@sombragris.org changed: What|Removed |Added CC||sombrag...@sombragris.org --- Comment #16 from sombrag...@sombragris.org --- Second this,. A "Typewriter Tool" equivalent (for an explanation in case it's necessary: http://documentgeek.blogspot.com/2011/01/acrobat-typewriter-tool-just-embrace-it_05.html) is something I sorely need to cut ties with the likes of Acrobat. -- You are receiving this mail because: You are the assignee for the bug. ___ Okular-devel mailing list Okular-devel@kde.org https://mail.kde.org/mailman/listinfo/okular-devel
[Okular-devel] [okular] [Bug 353401] Feature requst: "typewriter" annotation tool
https://bugs.kde.org/show_bug.cgi?id=353401 ANKIT YADAVchanged: What|Removed |Added CC||any65...@gmail.com -- You are receiving this mail because: You are the assignee for the bug. ___ Okular-devel mailing list Okular-devel@kde.org https://mail.kde.org/mailman/listinfo/okular-devel
[Okular-devel] [okular] [Bug 353401] Feature requst: "typewriter" annotation tool
https://bugs.kde.org/show_bug.cgi?id=353401 Simone Gaiarinchanged: What|Removed |Added CC||simg...@gmail.com -- You are receiving this mail because: You are the assignee for the bug. ___ Okular-devel mailing list Okular-devel@kde.org https://mail.kde.org/mailman/listinfo/okular-devel
[Okular-devel] [okular] [Bug 353401] Feature requst: "typewriter" annotation tool
https://bugs.kde.org/show_bug.cgi?id=353401 --- Comment #15 from Simone Gaiarin--- *** Bug 358062 has been marked as a duplicate of this bug. *** -- You are receiving this mail because: You are the assignee for the bug. ___ Okular-devel mailing list Okular-devel@kde.org https://mail.kde.org/mailman/listinfo/okular-devel
[Okular-devel] [okular] [Bug 353401] Feature requst: "typewriter" annotation tool
https://bugs.kde.org/show_bug.cgi?id=353401 --- Comment #14 from noric--- This is where I asked Poppler's devs: https://bugs.freedesktop.org/show_bug.cgi?id=93213 Yesterday I reported your findings to them. Let's see if they can help. -- You are receiving this mail because: You are the assignee for the bug. ___ Okular-devel mailing list Okular-devel@kde.org https://mail.kde.org/mailman/listinfo/okular-devel
[Okular-devel] [okular] [Bug 353401] Feature requst: "typewriter" annotation tool
https://bugs.kde.org/show_bug.cgi?id=353401 --- Comment #11 from Sumit Sahrawat--- I looked through the poppler source once again. I realized that even though the freeText annotation is implemented internally, the poppler-qt4 package doesn't export it. Specifically, the Annotation class from poppler-qt4 has a SubType enumeration, which contains only 15 values. The Annot class from poppler has an AnnotSubtype enumeration, which contains 27 values. FreeText is one of the values in poppler but not in poppler-qt4. -- You are receiving this mail because: You are the assignee for the bug. ___ Okular-devel mailing list Okular-devel@kde.org https://mail.kde.org/mailman/listinfo/okular-devel
[Okular-devel] [okular] [Bug 353401] Feature requst: "typewriter" annotation tool
https://bugs.kde.org/show_bug.cgi?id=353401 --- Comment #9 from noric--- I asked Poppler's devs and they say FreeText is already implemented in Poppler. They say the actual typewriter tool needs to be implemented by Okular (and other readers relying on Poppler). -- You are receiving this mail because: You are the assignee for the bug. ___ Okular-devel mailing list Okular-devel@kde.org https://mail.kde.org/mailman/listinfo/okular-devel
[Okular-devel] [okular] [Bug 353401] Feature requst: "typewriter" annotation tool
https://bugs.kde.org/show_bug.cgi?id=353401 --- Comment #8 from Sumit Sahrawat--- Seems like I underestimated the issues. 2-3 cannot be implemented without poppler support, sadly. -- You are receiving this mail because: You are the assignee for the bug. ___ Okular-devel mailing list Okular-devel@kde.org https://mail.kde.org/mailman/listinfo/okular-devel
[Okular-devel] [okular] [Bug 353401] Feature requst: "typewriter" annotation tool
https://bugs.kde.org/show_bug.cgi?id=353401 --- Comment #6 from Sumit Sahrawat--- I forgot to mention it here, the review request I made has been merged. 1) There are still some improvements to be made, but the code that was merged works perfectly when it comes to removing borders. Issue #332887. 2-3) They are valid feature requests, and would make for good junior jobs I think. I will see if I can get atleast one of them done. 4) I will work on this in the current season of KDE session. Issue #18. -- You are receiving this mail because: You are the assignee for the bug. ___ Okular-devel mailing list Okular-devel@kde.org https://mail.kde.org/mailman/listinfo/okular-devel
[Okular-devel] [okular] [Bug 353401] Feature requst: "typewriter" annotation tool
https://bugs.kde.org/show_bug.cgi?id=353401 Manuel López-Ibáñezchanged: What|Removed |Added CC||lopeziba...@gmail.com --- Comment #1 from Manuel López-Ibáñez --- I think this can be approximated already with an inline note with white background. The downside is that currently is not possible to remove the border around the note, nor set the background to transparent. If those two things were possible, it would be exactly what is needed (and perhaps it could be provided by default). -- You are receiving this mail because: You are the assignee for the bug. ___ Okular-devel mailing list Okular-devel@kde.org https://mail.kde.org/mailman/listinfo/okular-devel
[Okular-devel] [okular] [Bug 353401] Feature requst: "typewriter" annotation tool
https://bugs.kde.org/show_bug.cgi?id=353401 Gus Gustafsonchanged: What|Removed |Added CC||efelthau...@gmail.com --- Comment #3 from Gus Gustafson --- Some thoughts: --What if the color of the "page" is not white? User will have to try to match the comment background color to page color, as best as possible. This can be difficult. Transparent background option would be important. --Also, what will the experience be if there are very many places needing "typewriter"-type function on a page or document, if using inline comments? Have to change background color and border width for every one? That can be very user-unfriendly... Will Okular remember the last-used style setting for comments, and replicate it for next inline comment? -- You are receiving this mail because: You are the assignee for the bug. ___ Okular-devel mailing list Okular-devel@kde.org https://mail.kde.org/mailman/listinfo/okular-devel
[Okular-devel] [okular] [Bug 353401] Feature requst: "typewriter" annotation tool
https://bugs.kde.org/show_bug.cgi?id=353401 Sumit Sahrawatchanged: What|Removed |Added CC||sumit.sahrawat.apm13@iitbhu ||.ac.in --- Comment #2 from Sumit Sahrawat --- I'm working on making the border width customizable, which when set to 0 removes the border entirely. -- You are receiving this mail because: You are the assignee for the bug. ___ Okular-devel mailing list Okular-devel@kde.org https://mail.kde.org/mailman/listinfo/okular-devel
[Okular-devel] [okular] [Bug 353401] Feature requst: "typewriter" annotation tool
https://bugs.kde.org/show_bug.cgi?id=353401 --- Comment #4 from Manuel López-Ibáñez--- (In reply to Gus Gustafson from comment #3) > --Also, what will the experience be if there are very many places needing > "typewriter"-type function on a page or document, if using inline comments? > Have to change background color and border width for every one? That can be > very user-unfriendly... Will Okular remember the last-used style setting for > comments, and replicate it for next inline comment? You can create customized annotation styles. See the Okular Settings. -- You are receiving this mail because: You are the assignee for the bug. ___ Okular-devel mailing list Okular-devel@kde.org https://mail.kde.org/mailman/listinfo/okular-devel