GithubHelp home page GithubHelp logo

[Feature Request] Annotations about zathura HOT 26 OPEN

pwmt avatar pwmt commented on September 15, 2024
[Feature Request] Annotations

from zathura.

Comments (26)

sebastinas avatar sebastinas commented on September 15, 2024

On GitLab by @plalloni on Mar 31, 2018, 17:29


@gblanco what other viewer are you using for doing annotations?

from zathura.

sebastinas avatar sebastinas commented on September 15, 2024

On GitLab by @gblanco on Jun 16, 2018, 18:42


Hi @plalloni,

Sorry for the delay, I didn't received a notification.

The other viewer I'm using is Okular :)

from zathura.

sebastinas avatar sebastinas commented on September 15, 2024

On GitLab by @sanjay_ankur on Jul 2, 2018, 13:38


Somewhat unrelated question: how does one read annotations in Zathura (can one?)? I see that an icon is displayed, but I cannot figure out how to access them (not even clicking with the mouse works).

from zathura.

sebastinas avatar sebastinas commented on September 15, 2024

On GitLab by @gblanco on Jul 16, 2018, 13:49


Hi,

It is not supported by now.

@ALL I finally took the feature-annotations branch and updated it with all the new code. I branched off from develop at tag 0.4.0, although I don't know if I should have done it from the latest develop commit.

The project compiles perfectly and works well, however more work is needed and there are a few design decisions to be made, for example whether to write the messages inside a new popup or on the command bar at the bottom.

To keep a record, I did this on a fork of the project. I'll continue with it this summer and maybe a pull request could be submitted.

from zathura.

sebastinas avatar sebastinas commented on September 15, 2024

On GitLab by @ojzim on Nov 18, 2018, 07:19


I have a suggestion. Take a look at qpdfview. in qpdfview, you can highlight every place on the document using Control+Mouse click+Dragging, even if there is no text. But in Okular, you can highlight only where text exists.

The difference is in scanned documents. in qpdfview, you can highlight texts in scanned documents, but in okular you can't.

from zathura.

sebastinas avatar sebastinas commented on September 15, 2024

On GitLab by @guygma on Dec 2, 2018, 20:27


This is also the single feature that keeps me from using zathura as my only PDF reader. I would be happy to contribute to the effort of implementing this feature. With simple annotations and potentially form support, zathura would be feature-complete in my view.

from zathura.

sebastinas avatar sebastinas commented on September 15, 2024

On GitLab by @dschrempf on Apr 2, 2019, 15:56


I also want to express that of all enhancements, this one I miss the most. I decided to leave a comment here, because what I am doing at the moment might be interesting for others too. I use Zathura by default. And whenever I have to annotate something, I open Okular from within Zathura with the following key binding:

map <C-a> feedkeys ":exec okular %<Return>"

There might be an easier way than using feedkeys (I tried to use exec, but then the % sign does not work as expected).

One might want to extend this keybinding with scrolling to the page viewed at the moment in Okular, but I did not know how to achieve this.

from zathura.

sebastinas avatar sebastinas commented on September 15, 2024

On GitLab by @jcguu95 on Oct 28, 2019, 22:09


In theory I would imagine that to make annotation works one only needs zathura to:

  1. remember an associating file that contains annotation
    *2. return the current page, location, and location-of-cursor when called
  2. spawn our favorite $EDITOR when called, open the associating file, and scroll to the section that associates to the current page, location, and location-of-cursor.
  3. add layers to the file being read and display the content we want it to show

If we just forget about displaying fancy extra layer in our file being read and just want to take quick notes, all we need, I'd imagine, is to ask zathura to return the current page, location, and location-of-cursor.. and then a simple user script should take care of it. The idea is to make zathura more interactive, ask it to feedback more kinds of its current states, and let the user script take care of the rest.


zathura is an amazing project. Though I cannot parse C, I would like to try to contribute (and learn C on the way). Would anyone mind pointing out which file I should pay attention to narrow down?

from zathura.

sebastinas avatar sebastinas commented on September 15, 2024

On GitLab by @xxzozaxx on Oct 31, 2019, 19:41


Hey @jcguu95,

I'm happy that someone here is trying to make this feature possible.
I'm too interested in implement annotation (but only highlighter) and I skimmed Evince (GNOME pdf reader) code to see how they make it, and here is the conclusion.

basically the all main function you need exist in PopplerAnnot, and I have a little theory about the implementation, you gonna write a handler in zathura, and a simple function in zathura-poppler-plugin. I have a little knowledge about C too, and I read Evince code 2 days ago and still want to explore it more in depth, and didn't read any Zathrua code.

from zathura.

sebastinas avatar sebastinas commented on September 15, 2024

On GitLab by @Galicarnax on May 6, 2020, 10:45


Another zathura user here, craving for a (simple) annotation feature. I know that MuPDF currently supports annotations - does this imply that implementing annotations in zathura might be easier with mupdf plugin?

from zathura.

sebastinas avatar sebastinas commented on September 15, 2024

On GitLab by @gblanco on May 6, 2020, 11:14


Hi @Galicarnax, I think it should be more or less easy to implement, as some libraries already support it (MuPDF, poppler...).
Inspecting the code, I have a similar feeling to that of @xxzozaxx: A handler in zathura that calls the necessary functions on the pdf libraries. Nevertheless, I think some logic is to be made inside zathura-core, like calculating rect bounds, handle clicks and so on.

Also, I envision some decisions that should be taken care of beforehand. For example, how should the text be inputted to the annotation, how to choose annotation type, shortcuts, etc.

@sebastinas, what do you think? Maybe we can help somehow?

from zathura.

sebastinas avatar sebastinas commented on September 15, 2024

On GitLab by @mlq on May 6, 2020, 12:23


We have started implementing annotation support with libzathura, with the necessary types from the PDF standard. In addition, we started adding them to the plugins for mupdf and poppler in their own feature branch:

However, neither poppler (at least not on the glib side) nor mupdf parse all types (and all fields), so for some we started doing that manually (which is fine to do with mupdf).

For the interface, we started implementing new GTK widgets in libzathura-gtk that also gets rid of several other nasty bugs in the current widgets but still does not support all features we have now (but brings back other features as well). In libzathura-gtk, we also started implementing support for all annotation types: https://git.pwmt.org/pwmt/libzathura-gtk/-/tree/develop/libzathura-gtk%2Fpage%2Fannotations

Our plan is to migrate zathura to use libzathura-gtk as soon as at least the feature base of our current zathura version is supported and, thus, also support form fields (most of it is implemented already) and annotations as well.

We appreciate help on all those fronts 😃

from zathura.

sebastinas avatar sebastinas commented on September 15, 2024

On GitLab by @wisperwind on May 12, 2020, 19:01


This sounds great! I think this is really the feature missing from zathura.

@mlq said:

Our plan is to migrate zathura to use libzathura-gtk as soon as at least the feature base of our current zathura version is supported and, thus, also support form fields (most of it is implemented already) and annotations as well.

We appreciate help on all those fronts 😃

Maybe you could open another issue with a rough todo-list? That might be useful for others to figure out where they might help. In fact, I'd interested in helping out with the GTK bits since I've recently been learning to use the glib/gtk ecosystem a bit and this would be a nice project to continue :)

@gblanco said:

Also, I envision some decisions that should be taken care of beforehand. For example, how should the text be inputted to the annotation, how to choose annotation type, shortcuts, etc.

In my opinion, Okular is actually a good example here: In its review mode (toggled by a keyboard shortcut!), you get a docked toolbar with a number of large buttons to select a few tools. These can be configured in a settings dialog, for zathura that could just go into the config file. Compared to other pdf readers (Evince, Foxit, Preview on macOS), this has immensely better usability: I guess (essentially) everybody uses but a small selection of tools (for me: three highlight colors, sticky note annotations, sometimes wavy underlining), which means each of these can be selected with just one click. In the case of Foxit (which I've been using recently for lack of better alternatives), changing to a highlighter with a different color is easily 3 clicks (select highlight mode, click on color drop-down, click on color) while moving the cursor from one end of the screen to the other. This is a huge distraction while reading.

from zathura.

sebastinas avatar sebastinas commented on September 15, 2024

On GitLab by @gblanco on May 14, 2020, 16:02


@mlq I though the maintainer was Sebastian, my bad :(

@wisperwind said:

Maybe you could open another issue with a rough todo-list? That might be useful for others to figure out where they might help. In fact, I'd interested in helping out with the GTK bits since I've recently been learning to use the glib/gtk ecosystem a bit and this would be a nice project to continue :)

I totally agree, a todo-list could be very helpful, it is a large code base. I have almost no experience with GTK, so maybe I can help on other parts, like the features in mupdf, poppler plugins.

I agree with Okular being a good example, though I feel all those buttons are not the zathura-vim way...

from zathura.

sebastinas avatar sebastinas commented on September 15, 2024

On GitLab by @victoriajeegreen on Aug 9, 2020, 19:59


We have started implementing annotation support with libzathura

that's wonderful uwu

However, neither poppler (at least not on the glib side) nor mupdf parse all types (and all fields)

if the challenge proves itself too daunting, may i suggest you guys to take a look into XFDF (a sidecar file that doesn't demand any support on the original file)

>w<

from zathura.

sebastinas avatar sebastinas commented on September 15, 2024

On GitLab by @jcguu95 on Aug 26, 2020, 19:29


Thanks for reply! I noticed a super neat way to do annotation.. in plain text! See org-noter for the workflow. The only problem is that org-noter only integrates with pdf-tools.. which crashes my emacs very often. It has long been an issue..

To detach from pdf-tools, it turns out all we need is to communicate and demand zathura to run certain functions externally! That's basically how org-noter works. I have opened up an issue asking how to..

from zathura.

sebastinas avatar sebastinas commented on September 15, 2024

On GitLab by @minhaj.sixbyte on Sep 10, 2020, 19:01


cool. thanks for the idea

from zathura.

sebastinas avatar sebastinas commented on September 15, 2024

On GitLab by @midhun on Jan 15, 2021, 11:42


This feature would be really great if you implement it on Zathura. Any update on this?

from zathura.

sebastinas avatar sebastinas commented on September 15, 2024

On GitLab by @dschrempf on May 30, 2021, 13:08


I was just saying to myself: It is a pain that I have to change my favorite viewer so often to annotate what I am reading :).

from zathura.

sebastinas avatar sebastinas commented on September 15, 2024

On GitLab by @nima on Jul 16, 2021, 04:32


I was just saying to myself: It is a pain that I have to change my favorite viewer so often to annotate what I am reading :).

To relieve the pain, the best work around is map a key to open the page in mupdf and then using mupdf (pressing a in mupdf) for annotation. Since both zathura and mupdf similar in philosophy it is less of a pain than launching Acrobat!

from zathura.

sebastinas avatar sebastinas commented on September 15, 2024

On GitLab by @ryan on Sep 8, 2021, 05:13


@dschrempf

Is it possible to add the current page when sending to okular?

I saw Okular has a -p --page number option to open the given page in the document.

I saw a feature request for adding PAGENUMBER for scripts, but not sure if the same applies for mappings.

Would be a game changer on longer documents until Okular's highlighting arrives...

Next I'll have to figure out how to sync highlighting with moon+ reader.

from zathura.

sebastinas avatar sebastinas commented on September 15, 2024

On GitLab by @dschrempf on Sep 9, 2021, 13:33


@ryan I do not know. I am still using the key without page number.

from zathura.

sebastinas avatar sebastinas commented on September 15, 2024

On GitLab by @dschrempf on Sep 9, 2021, 13:33


I saw below that there is a method to open mupdf, maybe that's preferrable?

from zathura.

sebastinas avatar sebastinas commented on September 15, 2024

On GitLab by @ghd on Mar 24, 2022, 03:15


Any updates on this?

from zathura.

sebastinas avatar sebastinas commented on September 15, 2024

On GitLab by @keith on Mar 24, 2022, 15:19


The onus for this definitely isn't on the Zathura devs (thank you for all the great work you have already done!), but this is definitely one of the features I find myself thinking about often.

from zathura.

sebastinas avatar sebastinas commented on September 15, 2024

On GitLab by @oliverlew on Jan 15, 2023, 13:14


Hey, I am wondering, after changes such as !59, would it be easier to implement the text highlighting annotation? That MR can locate the text rectangles of the user's selected texts. That seems one step towards text highlighting annotation. With this, zathura can get coordinates of the selected texts, pass the coordinates of those rectangles to poppler (this) or mupdf API to add highlighting there, right?

Here is my imagined scenario: first, select text like in !59, then, right clicking the selection will pop up a menu with "highlight select text", last, click the menu item and the texts get highlight annotation. Right click the highlight-annotated texts, a menu pops up with "remove highlighting" to remove the annotation.

from zathura.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.