emacs-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Multi image PDF continuous mode


From: Juri Linkov
Subject: Multi image PDF continuous mode
Date: Thu, 09 Dec 2021 19:05:53 +0200
User-agent: Gnus/5.13 (Gnus v5.13) Emacs/29.0.50 (x86_64-pc-linux-gnu)

Doc-view has such a long-standing shortcoming that it doesn't allow
continuous scrolling of PDF pages when one PDF page at the top of the
window smoothly flows into the next PDF page at the bottom of the window.

But it seems there is no inherent limitation in Emacs that would
prevent implementing this.  And indeed after doc-view generates
PNG images in /tmp/docview*/*pdf/*.png it's possible to insert
absolute filenames of all PNG files into some buffer, then enable
two modes:

  M-x iimage-mode RET

that replaces filenames with images, and after

  M-x pixel-scroll-precision-mode RET

wheel-mouse scrolls consecutive PDF images smoothly
like all decent PDF viewers do.

OTOH, scrolling keys are not so nice, and PgUp/PgDn
insist on jumping to the top of the next image.
But maybe image-scroll-up and image-scroll-down
could be adapted to multi image buffers,
possibly by creating a new mode multi-image-mode.
Also mouse dragging could help in scrolling.

Now when looking at this problem from another point of view,
browsing a list of image files is what image-dired.el
is intended to do.  After doc-view generates a gallery
of PDF images, image-dired could be invoked on the output
directory of PNG images, and indeed in this case
the window layout of image-dired looks like what most
PDF viewers do: on the left side there is a narrow window
with thumbnails of PDF pages, and on the right side
a larger window with PDF pages.

PS: Actually, there is some weird problem in image-dired: when
the thumbnail window is resized to a width less than half-frame,
then image-dired creates a new thumbnail window.  But surely
this could be fixed.



reply via email to

[Prev in Thread] Current Thread [Next in Thread]