Skip to content

Latest commit

 

History

14 Commits

Folders and files

NameName
Last commit message
Last commit date
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

  _             _  __
 | |_ _ __   __| |/ _|
 | __| '_ \ / _` | |_
 | |_| |_) | (_| |  _|
  \__| .__/ \__,_|_|
     |_|

CI License: GPL-3.0

A fast terminal PDF viewer.

tpdf demo

Supported Terminals

tpdf requires a terminal with a graphics protocol. It auto-detects the best available protocol at startup.

Terminal Protocol Support
Kitty Kitty graphics ✅
WezTerm Kitty graphics ✅
iTerm2 iTerm2 inline images ✅
Ghostty Kitty graphics ✅
foot Sixel ✅
Konsole Sixel ✅
contour Sixel ✅
mlterm Sixel ✅
xterm (with -ti 340) Sixel ✅
tmux Passthrough ⚠️
Alacritty None ❌
Windows Terminal None ❌
macOS Terminal.app None ❌
GNOME Terminal None ❌

Installation

curl -fsSL https://raw.githubusercontent.com/IWhitebird/tpdf/master/install.sh | bash

Other methods

Download manually — grab the latest binary from Releases:

tar xzf tpdf-*.tar.gz
sudo mv tpdf /usr/local/bin/

Build from source (requires Rust toolchain + libfontconfig1-dev):

git clone https://github.com/IWhitebird/tpdf.git
cd tpdf
cargo build --release
sudo cp target/release/tpdf /usr/local/bin/

Usage

tpdf [OPTIONS] [PATH] [COMMAND]
Arguments:
  [PATH]  Path to PDF file

Commands:
  update  Update tpdf to the latest version

Options:
  -n, --night           Start in night mode
  -f, --fullscreen      Start in fullscreen
  -p, --page <N>        Start at page number
  -d, --layout <1|2|3>  Layout: 1 (single), 2 (dual), 3 (triple)
  -h, --help            Print help
  -V, --version         Print version

Keybindings

Key Action
h / l Previous / next page
j / k Pan down / up (when zoomed)
H / L Pan left / right (when zoomed)
+ / - Zoom in / out
0 Reset zoom
d Cycle layout (1-up / 2-up / 3-up)
n Toggle night mode
f Toggle fullscreen
p Go to page
g / G First / last page
q Quit

Roadmap

More features coming soon!

  • Text mode for terminals that don't support graphics protocols
  • Text search within PDFs
  • Table of contents / outline navigation
  • Bookmark support
  • Copy text to clipboard
  • Mouse support (scroll, click to pan)
  • Custom color themes
  • PDF form viewing
  • Continuous scroll mode

License

GPL-3.0

About

Fast, lightweight terminal PDF viewer written in Rust

Topics

Resources

Stars

3 stars

Watchers

0 watching

Forks

Releases

Packages

Contributors

Languages