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

[FR] Suggestions for optimizing the display of PDF annotations #89

Closed
dfyxandskwy opened this issue Mar 6, 2024 · 4 comments
Closed
Labels
enhancement New feature or request

Comments

@dfyxandskwy
Copy link

Describe your request

Scenario Description

In PDF reading, users tend to highlight and underline noteworthy content within the page. If the number of these contents in a PDF page is not much, and a knowledge of the text is not too long, the entire PDF page does not look too fancy, then, the page highlighting can indeed effectively attract the attention of users. However, once the content is too much, too long, highlighting will lose its effect. In order to reduce the page highlighting, users will be in the annotation, only highlight the keyword words, rather than the entire sentence.
Our plugin in order to achieve the transfer of text in the PDF to the obsidian document, the current annotation method is to highlight the entire sentence to get a deep link. In this way, it will encounter what I said above highlighting too much content, too long.

Idea

Users can get the deep link of the corresponding text without highlighting the PDF text and place it in the obsidian document. Then, the user can highlight and underline some keywords in the PDF text just obtained in the obsidian document. Then with the help of our plugin, the highlighting and underlining of these partial keywords can be reversely displayed on the PDF page.

Advantages

If the above idea is realized, the PDF page display will be more concise, and the user can only through an annotation operation, in the obsidian document and PDF page in two places to achieve the keyword highlighting, underlining.

Existing conditions

I think the realization of the above ideas need to use the obsidian PDF reader in the deep links, backlinks feature. Fortunately, PDF + + currently take full advantage of these two features. PDF + + should be more likely than obsidian in other PDF plugins to realize my ideas.

At present, I have not encountered a PDF reader or PDF plugin that can realize the above idea. I hope you will consider my suggestions. Good luck with your work.

@dfyxandskwy dfyxandskwy added the enhancement New feature or request label Mar 6, 2024
@RyotaUshio
Copy link
Owner

RyotaUshio commented Mar 7, 2024

Thanks a lot for the detailed suggestion, and I totally get your point.
I guess your idea can be already realizable with the following approach:

First, create & enable the following CSS snippet.

.pdf-plus-backlink-selection:not(:hover) {
    background-color: transparent !important;
}

/* The following rule is optional */
.pdf-plus-backlink-selection:hover {
    opacity: 0.1 !important;
}

Then you will be able to do something like this:

Screen.Recording.2024-03-07.at.14.55.40.mov

@RyotaUshio
Copy link
Owner

Update: From next version on, the following snippet will give better results for multi-line highlights:

.pdf-plus-backlink-selection:not(.is-hovered) {
    background-color: transparent !important;
}

.pdf-plus-backlink-selection.is-hovered {
    opacity: 0.1 !important;
}

@RyotaUshio
Copy link
Owner

The is-hovered CSS class (see my previous comment) is now available in 0.37.12.

@RyotaUshio
Copy link
Owner

Closing this as it's been a while since the last response.

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

No branches or pull requests

2 participants