A simple PDF viewer with a continuous view without margins.
- Continuous view of PDF pages without margins
- Optimized performance with lazy page loading (only visible pages are rendered)
- Fullscreen mode toggle with the "f" keyboard shortcut (menu and status bar automatically hide in fullscreen mode)
- Zoom controls:
- Zoom in/out with Ctrl+mouse wheel
- Predefined zoom levels (100%, fit width, fit page) toggled with the "z" key
- Open PDF files:
- Via command-line arguments
- Through the file dialog (Ctrl+O)
- Page navigation:
- The current page and total pages are displayed in the status bar
- Jump to the specific page with Ctrl+G
- Starts maximized by default
- Python 3.13.1 or higher
- PySide6
- PyMuPDF
-
Clone the repository:
git clone <repository-url> cd pdf-reader -
Set up the environment:
# Using pyenv (optional) pyenv local 3.13.1 # Install dependencies with uv uv sync
python main.py [path/to/file.pdf]
- Ctrl+O: Open a PDF file
- f: Toggle fullscreen mode
- z: Cycle through zoom modes (100%, fit width, fit page)
- Ctrl+G: Go to specific page
- Ctrl+mouse wheel: Zoom in/out
- +: Zoom in by 10% increments (rounds to the nearest multiple of 10%)
- -: Zoom out by 10% increments (rounds to the nearest multiple of 10%)
- =: Set zoom to 100%
- Home: Jump to the first page
- End: Jump to the last page
- Left/Right arrow keys:
- Navigate to the previous/next page when the zoom factor is not larger than "fit to width"
- Scroll left/right when the zoom factor is larger than "fit to width"
- q or Esc: Exit the application
-
Python Version: The project requires Python 3.13.1 or higher. You can use the
.python-versionfile with pyenv. -
Dependencies Management:
- The project uses
uvfor dependency management - Install dependencies with:
uv sync
- The project uses
-
Environment Variables:
- Copy the
.envfile and adjust settings as needed - Environment variables are loaded using django-environ in
python/env.py
- Copy the
Before submitting your work:
- Add all new files to the git staging area:
git add <filename>orgit add . - Run pre-commit on all files:
pre-commit run --all-files - Fix any issues reported by pre-commit