pdf-tui is a PDF reader for the terminal, built with ratatui.
pdf-tui_demo.mp4
- Sharp page images through the Kitty, Sixel, or iTerm2 graphics protocols, with Chafa text rendering as a fallback in any terminal
- Continuous scrolling in one or more columns, or a fixed page grid
- Bookmark tree with page previews, embedded-text search with highlighted matches, and mouse selection of page regions to copy as text or PNG
- Edit PDF metadata and bookmarks in
$EDITOR - Reload with
r, or automatically whenever the PDF is rebuilt, and reopen documents where you left off (both opt-in inconfig.toml) - Pages are rendered in the background, preloaded around the current position, and cached on disk
popplerforpdfinfo(required),pdftotext(search and selection text), and the optional Poppler raster backendpdfiumfor the default PDF raster backendmupdffor the optionalmutoolraster backendchafafor text rendering when no graphics protocol is availableexiftoolfor showing and editing PDF metadatapdftkfor reading and editing PDF bookmarks. Homebrew provides this command through thepdftk-javaformula.- optional
wl-copy,xclip, orxselon Linux for copying selected text or PNGs
Manual dependency install examples:
sudo pacman -S poppler chafa perl-image-exiftool pdftk mupdf-tools
yay -S pdfium-binaries-bin
brew install poppler chafa exiftool pdftk-java mupdfThe Homebrew formula bundles a compatible Pdfium dynamic library and launches
pdf-tui with PDF_TUI_PDFIUM_LIBRARY_PATH set, so the default Pdfium backend
works without editing the config. When running from source on macOS, provide a
compatible libpdfium.dylib with PDF_TUI_PDFIUM_LIBRARY_PATH or
render.pdfium_library_path.
Arch Linux AUR:
yay -S pdf-tui-binAlternative AUR packages:
yay -S pdf-tui # build the latest stable release from source
yay -S pdf-tui-git # build the latest git version from sourceHomebrew:
brew install WindustH/tap/pdf-tuiWindows (experimental and untested): download the
x86_64-pc-windows-msvc ZIP from the release page, then follow the
Windows setup guide. The Windows build is produced by CI, but
has not been tested by the maintainer on a real Windows installation. The guide
covers Poppler and optional feature dependencies plus the default Pdfium
backend and its pdfium.dll configuration. Pdfium was the fastest backend in
the project's existing Linux benchmark; Windows performance is untested.
The Homebrew stable formula downloads a prebuilt release binary. To build the latest git version from source:
brew install --HEAD WindustH/tap/pdf-tuipdf-tui /path/to/file.pdf
pdf-tui --progress 12.5 /path/to/file.pdf # 0-based: the middle of page 13
pdf-tui /path/to/file.pdf scroll 2 3 # two columns, three steps per screen
pdf-tui /path/to/file.pdf grid 2 3 # two rows of three pagesScroll with j/k or the mouse wheel, move a screen at a time with h/l,
and press F1 for the key bindings of the current view. b opens bookmarks, s
searches, m shows metadata, and : opens the command prompt, e.g.
:layout-use grid 2 2. q quits.