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

Won't add Annotations to pdf files. #1389

Open
thepragmaticmero opened this issue Sep 6, 2024 · 5 comments
Open

Won't add Annotations to pdf files. #1389

thepragmaticmero opened this issue Sep 6, 2024 · 5 comments
Labels
bug Something isn't working

Comments

@thepragmaticmero
Copy link

thepragmaticmero commented Sep 6, 2024

Describe the bug
Video:
Kooha-2024-09-06-13-20-13.webm

To Reproduce
Steps to reproduce the behavior:

  1. Try to select a text and add an annotation

Expected behavior
To add an annotation to my .pdf file and the possibility of exporting it as .json or .

Version:

  • Foliate version: 3.1.1
  • OS/Distribution and version: Fedora Silverblue 41
  • Desktop environment: Gnome 47
  • Installation method: Fatpack (they're really fat)

Additional context
Also when supposedly "works" it doesn't highlight the text. Pls fix, it's such a letdown that doesn't work reliably :C

  • Pressing Enter doesn't work
  • I already added permissions to enable /home, where my book.pdf is located, on flatseal.
  • Doesn't highlight text
  • Works unreliably
  • Crashes sometimes when I try to click on the "options" menu (button next to the trashcan)
@thepragmaticmero thepragmaticmero added the bug Something isn't working label Sep 6, 2024
@thepragmaticmero
Copy link
Author

thepragmaticmero commented Sep 6, 2024

image


If you need journalctl I'm game.

Mmm.... the crashes are hard to replicate, maybe some vodoo magic will help.

@thepragmaticmero
Copy link
Author

Ok the annotations are being created, it's just that the app doesn't reflect that on GTK4.

  • Output after exporting as json:
    {
      "value": "epubcfi(/6/20!/4/4/50,/1:32,/1:63)",
      "color": "orange",
      "text": "are important for writing bigge",
      "note": "",
      "created": "2024-09-06T18:43:19.966Z",
      "modified": ""
    },
    {
      "value": "epubcfi(/6/20!/4/4,/62/1:7,/66/1:44)",
      "color": "yellow",
      "text": "proach and its drawbacks. Most notable is that the complete story on any particular featureis not found here, and the tutorial, by bein",
      "note": "kittycat",
      "created": "2024-09-06T18:19:18.095Z",
      "modified": "2024-09-06T18:19:22.356Z"
    },
    {
      "value": "epubcfi(/6/20!/4/4,/66/1:9,/70/1:43)",
      "color": "yellow",
      "text": "und here, and the tutorial, by being brief, may also be misleading. And because theexamples do not use the full power of C, th",
      "note": "",
      "created": "2024-09-06T18:19:30.046Z",
      "modified": ""
    },
    {
      "value": "epubcfi(/6/20!/4/4,/66/1:21,/70/1:58)",
      "color": "yellow",
      "text": "d the tutorial, by being brief, may also be misleading. And because theexamples do not use the full power of C, they are not as c",
      "note": "what the fuck man what is this",
      "created": "2024-09-06T18:42:56.985Z",
      "modified": "2024-09-06T18:43:12.895Z"
    }
  ]
}

@thepragmaticmero
Copy link
Author

week 3.... any dev here pls?? Q-Q sad face

@johnfactotum
Copy link
Owner

johnfactotum commented Sep 28, 2024

Annotations aren't currently supported for PDF. There are at least two problems here. The first is that annotations don't work in all fixed-layout books, not just PDFs, because the fixed-layout renderer does not support rendering overlays (yet). The second issue is that currently all annotations are identified with EPUB CFI. Probably for PDF (and maybe even other fixed-layout books), they should be stored with the rects of the highlighted text.

@thepragmaticmero
Copy link
Author

oh, thks 4 the knowledge, explains a lot~. I'll be around looking for the progress.~

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

2 participants