GithubHelp home page GithubHelp logo

Comments (9)

einalex avatar einalex commented on May 27, 2024 1

https://www.reddit.com/r/RemarkableTablet/comments/n667u7/highlighting_on_27_some_specs/

so 2.7 is out now and it seems, getting marked areas is now easy as pie. Check the linked reddit post.

from remarks.

lucasrla avatar lucasrla commented on May 27, 2024 1

Hey all, remarks now supports reMarkable's "smart" highlighting. See: da6433f

from remarks.

einalex avatar einalex commented on May 27, 2024

example file illustrating narrow markup
Goodrich, Schultz - 2007 - Human-Robot Interaction A Survey_remarks.pdf

from remarks.

lucasrla avatar lucasrla commented on May 27, 2024

Hey @einalex, thanks for reaching out.

I agree that the way highlights look could be improved.

If you (or anyone else reading this in the future) is willing to contribute with PRs towards better highlighting, I am happy to help / review.


Right now, in remarks, we infer highlighting coordinates starting from what has been drawn on the reMarkable device.

If we somehow checked our inferred coordinates with the actual PDF textboxes, we should be able to achieve better looking highlights.

Off the top of my head, a path to that could be:

  1. Refactor the code to, while parsing highlighted text, get the "actual rects/quads" using PyMuPDF's search_for()

  2. If necessary, use some kind of method to get an "enveloping" rectangle per highlighted line (maybe via Shapely or from PyMuPDF itself)

  3. Use those "enveloping" rectangles (instead of the seg_rect we currently use) to draw the annotations via addHighlightAnnot() as in drawing.py#L104

This path could work well for "well-behaved"/textual PDFs. Again, those "actual rects/quads" should get us better-looking highlights because they are the actual PDF textbox dimensions.

Great-looking highlights in image-based/OCRed PDFs (e.g. the Turing paper from the demo) should be trickier because their PDF textboxes likely are much less reliable.

Thanks again

from remarks.

einalex avatar einalex commented on May 27, 2024

My intuition was to get the required geometry from the position of the highlighted text we already extract. Essentially mark that as highlighed..if such a thing is possible.

from remarks.

einalex avatar einalex commented on May 27, 2024

"This is a significant change to the underlying file format: highlighter strokes have been removed from the .rm files and into JSON files in a separate .highlighter directory. These files contain additional data including the actual text that was highlighted and some offset information that helps when grouping strokes together."
https://www.reddit.com/r/RemarkableTablet/comments/mvewrr/version_27030_available_in_beta_program/

This is likely going to change things.

from remarks.

lucasrla avatar lucasrla commented on May 27, 2024

Re your intuition, not sure I completely got what you meant by "mark that as highlighted" but yes, there should be different paths to solve this issue.

Re the new highlighting capabilities. That's very interesting! Thanks for sharing. I was not drawn for this beta program. My device is currently on 2.6.2.75 and, as of today, it says there is no update available.

It seems we should wait until this new update is officially released to tackle this issue.

Thanks

from remarks.

lucasrla avatar lucasrla commented on May 27, 2024

Good! I will read the reddit post.

My device is still on 2.6.2.75, though. I have just checked for new updates and it says "Your device is up to date." I guess their release process might take a few hours / days to reach all users.

from remarks.

stefanheyder avatar stefanheyder commented on May 27, 2024

Do you think that remarks will in the future be able to use the marked areas and highlighted texts (for conversion to .md) from 2.7 by directly parsing the json files created?

If you give me some pointers to the code where this parsing occurs, I might be able to submit a PR for this.

from remarks.

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.