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

Not working when pages are equal to or less than the size of the containing window #16

Open
skyler544 opened this issue Jan 5, 2023 · 2 comments

Comments

@skyler544
Copy link

Minimal configuration to reproduce:

(package-initialize)

(when (and (not (package-installed-p 'use-package)) (assoc 'use-package package-archive-contents))
    (package-install 'use-package))

(use-package image-roll
  :ensure nil
  :load-path "~/build/image-roll.el/"
  :init (require 'image-roll)
  :after pdf-view
  :hook (pdf-view-mode . pdf-view-roll-minor-mode))

(use-package pdf-tools
  :ensure nil
  :load-path "~/build/pdf-tools/lisp")

In this case, the pdf-tools package is your fork with the image roll branch checked out.

Now try opening a pdf file with vertically small pages, such as a slideshow (installing pdf-tools if needed). Try scrolling, and observe that nothing happens.

The default command for scrolling in this view is pdf-view-next-line-or-next-page, but the bug also occurs if you try calling image-roll-scroll-forward directly.

I looked at the code but was unable to come up with a fix myself, though I'm relatively sure that the bug does not actually stem from the image-roll-scroll-forward function, but from the image-roll-update-displayed-pages function.

@dalanicolai
Copy link
Owner

Thanks for reporting the issue. I have tested it and can confirm the bug. However, I am not maintaining this package anymore. I have written a better alternative to image roll in doc-scroll.el, which you can find here. That repo also contains several backends for displaying PDF's (and DJVU's) with doc-scroll (more info you can find in the README...) but unfortunately I had no time to integrate it with PDF-tools (PDF-tools is quite a complex library, and it is really not designed for continuous scrolling. Getting image-roll to work with it costed me quite some time also). If you are only reading PDF's, then doc-scroll might be an okay alternative (although it is really not finished, and unfortunately I am not in a privileged position to be able to finish it soon). However, if you'd also like to make annotations, then image-roll is probably the better alternative.

B.t.w. if your pages are smaller than the buffer, I guess/hope using the default pdf-tools scrolling should not be a too bad alternative... Anyway, good luck :)

@aikrahguzar
Copy link

This is one of the issues I think I have fixed. See #19 (comment) for details.

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

3 participants