Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Ability to link to specific text within PDF #17

Open
justinmoon opened this issue Jan 2, 2018 · 2 comments
Open

Ability to link to specific text within PDF #17

justinmoon opened this issue Jan 2, 2018 · 2 comments

Comments

@justinmoon
Copy link

justinmoon commented Jan 2, 2018

I want to make links like this:

[[~/genesis.pdf::5##And God said, “Let there be light,” and there was light]]

This would open up genesis.pdf file, scroll to page 5, and highlight the selection And God said, “Let there be light,” and there was light on that page.

This package can already do everything except the highlighting bit.

I'm an emacs-lisp newb, but I'm pretty motivated to figure out how to do this so I'd appreciate any suggestions.

Thanks for listening.

@justinmoon
Copy link
Author

justinmoon commented Jan 2, 2018

I imagine it will work like the height parameter in the current org-pdfview-open() function.

But instead of scrolling down to a position, it will attempt to highlight whatever text is passed in.

Perhaps I can just use this height param if anyone can explain how to use it?

@justinmoon justinmoon changed the title Ability to link to specific selection withing PDF Ability to link to specific selection within PDF Jan 2, 2018
@justinmoon justinmoon changed the title Ability to link to specific selection within PDF Ability to link to specific text within PDF Jan 2, 2018
@markus1189
Copy link
Owner

@superquest Sounds useful! You would have to adapt the regex to match an optional text to highlight here: https://github.com/markus1189/org-pdfview/blob/master/org-pdfview.el#L48

Then you can extract it via match-string as is done for path, page, height.

The trickiest part is probably to make all of the old behavior work with the new one.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants