ahrm / sioyek-python-extensions

Python wrapper and simple addons for sioyek PDF viewer
GNU General Public License v3.0
165 stars 7 forks source link

[Bug] _embed_annotations #2

Open Elaws opened 1 year ago

Elaws commented 1 year ago

Bug description

When using _embed_annotations command, Sioyek embeds more than what was previously highlighted, or embeds improperly.

Steps to reproduce

Bug example 1 :

  1. In tutorial.pdf, highlight the word "Use" line 3 (in "Use the arrow keys for navigation").
  2. Use the _embed_annotations command.

Result :

image

Bug example 2 :

  1. In tutorial.pdf, highlight the "to fit the document" line 9 (in "Press F9 to fit the document to screen").
  2. Use the _embed_annotations command.

Result :

image

Expected results

In example 1, only the word "Use" line 3 should be highlighted. In example 2, "to fit the document" line 9 should be embedded (it is not embedded, but "to fit the document" line 8 is embedded).

Environment

Windows 11 Sioyek - Commit https://github.com/ahrm/sioyek/commit/caf5569ae896d1d945ec891dddbd48732a5be475

ahrm commented 1 year ago

Should be fixed in the latest version.

Elaws commented 1 year ago

Thanks a lot !

gokberkgunes commented 1 year ago

I am having a similar issue to this one. Using the python command described in the README.md generates embedded highlights above the sioyek highlights.

Here's a picture of python command, _embed_annotations.

image

Here is the one using the embed_annotations command which is probably built-in to sioyek, I am not sure.

image

Here one may obtain the open-access pdf file for testing purposes.

ahrm commented 1 year ago

The problem was that the page's mediabox origin was not (0, 0) for some reason. The issue should be fixed in ea161c485f4b7f8d4662ddbc333c5d5f33034ab8.

naquad commented 3 days ago

Same here. Multiple highlights added, wrong places, deleting highlights is impossible.