-
doc-view integration implemented with two advice functions:
-
kitty-gfx--doc-view-mode-p-advice: Bypasses(display-graphic-p)guard indoc-view-mode-p. Checks for conversion tools (gs, mutool, pdftocairo) to ensure the pipeline can actually run. -
kitty-gfx--doc-view-insert-image-advice: Interceptsdoc-view-insert-imageto display page PNGs via Kitty graphics instead of Emacs image specs. Manages a per-buffer overlay (kitty-gfx--doc-view-overlay) so page navigation replaces the previous page image.
The conversion pipeline (PDF→PNG via Ghostscript/MuPDF) works without GUI — only the display step assumes a graphical frame. Page navigation (next/prev) should work via the existing
doc-view-goto-page→doc-view-insert-imagepath.Byte-compiles and load-tests clean. Needs manual testing with a PDF file.
-
-
Previous Value Current Value Open
In Review
-
Fixed in fec2c3b. PDF pages display via Kitty graphics with page navigation (n/p) and zoom (+/-/0). Centered display. User verified working. Known minor limitation: initial page may briefly flash before centering.
-
Previous Value Current Value In Review
Closed
| Type |
New Feature
|
| Priority |
Normal
|
| Assignees |
Not assigned
|
Reported by: Reddit user
Add integration with
doc-view-mode(built-in) and optionallypdf-view-mode(pdf-tools) to display PDF pages as images in terminal Emacs via Kitty graphics.Approach:
doc-view-modealready converts PDF pages to PNG — hook into its display pathimage-modeadvice pattern: intercept when in terminal modepdf-toolsuses its own rendering pipeline — may need separate integrationConsiderations: