elias-sundqvist / obsidian-annotator

A plugin for reading and annotating PDFs and EPUBs in obsidian.
GNU Affero General Public License v3.0
1.46k stars 68 forks source link

Selection displayed in incorrect location #269

Open Ellpeck opened 1 year ago

Ellpeck commented 1 year ago

I don't really know how else to describe this, so I also had trouble finding an existing issue report for this, both on this issue tracker and on the hypothesis issue tracker, so I'm very sorry if this has already been reported.

Essentially, when selecting text to highlight (or copy), the selected area is in a totally different location than the actual text. The weird thing is that this doesn't happen in other PDF editors/viewers. To clarify what I mean, here are two screenshots, one from within the annotator plugin, and one from Chrome's PDF viewer, both after hitting CTRL+A to select all the text in the PDF.

image

image

It seems like this mostly happens with OCR'd PDFs, and especially when the resulting text is at an angle due to the original scan of the document being on an angle.

swekia commented 1 year ago

I ran into something similar: When selecting text, it selects a whole "column" instead of the text, character-by-character.

PDF_AnnotationView

When I open the same PDF in Obsidian MD's normal view, selecting the text works as expected.

PDF_NormalView

Maybe it is connected to "older" PDFs in combination with Annotator.

Thanks for taking a look!