Skip to main content

NeoView PDF viewer with rectangular crop/measure tool

Project description

NeoView

NeoView is a production-quality PDF viewer with a rectangular crop/measure tool for Linux desktops (Wayland/X11).

Features

  • PDF Viewing: Open and navigate multi-page PDFs
  • Zoom: Pinch gestures, Ctrl+wheel, Fit Width, Actual Size
  • Selection Tool: Click+drag to create measurement rectangle
  • Precise Adjustment: Drag edges/corners to resize, keyboard nudges
  • Measurements: Live display in points, picas, and millimeters
  • Export: Save selection as PNG at 150/300/600 DPI
  • Auto-reload: Watch file for external changes
  • Container-ready: Works with Wayland or X11 forwarding

Requirements

  • Python 3.10+
  • PySide6
  • PyMuPDF

Installation

pip install neoview

Install from source (launchable)

pip install .

This installs a neoview launcher. Run it to open the app, then use File → Open to choose a PDF.

Optional desktop launcher (Linux):

./install_desktop.sh

Usage

Direct Run

# Open with file dialog
python pdf_crop_measure.py

# Open specific PDF
python pdf_crop_measure.py /path/to/document.pdf

Installed App

# Open the app
neoview

# Open specific PDF
neoview /path/to/document.pdf

Module Run

python -m neoview

Container Run

Build:

docker build -t pdf-measure .

Wayland (GNOME Wayland - preferred):

docker run -it --rm \
  -e XDG_RUNTIME_DIR=/run/user/$(id -u) \
  -e WAYLAND_DISPLAY=$WAYLAND_DISPLAY \
  -e QT_QPA_PLATFORM=wayland \
  -v $XDG_RUNTIME_DIR/$WAYLAND_DISPLAY:/run/user/$(id -u)/$WAYLAND_DISPLAY \
  -v /path/to/pdfs:/pdfs \
  pdf-measure /pdfs/document.pdf

X11 (fallback, most compatible):

xhost +local:docker
docker run -it --rm \
  -e DISPLAY=$DISPLAY \
  -e QT_QPA_PLATFORM=xcb \
  -v /tmp/.X11-unix:/tmp/.X11-unix \
  -v /path/to/pdfs:/pdfs \
  pdf-measure /pdfs/document.pdf

Keyboard Shortcuts

Shortcut Action
Ctrl+O Open PDF file
Ctrl+Q Exit application
Ctrl+C Copy measurements to clipboard
Ctrl+S Export selection as PNG
PgUp / PgDn Previous / Next page
Ctrl+Wheel Zoom in/out
W Fit to width
1 Actual size (100%)
Arrow Move selection by 1 pt
Shift+Arrow Move selection by 10 pt
Ctrl+Arrow Resize selection by 1 pt
Ctrl+Shift+Arrow Resize selection by 10 pt
Escape Clear selection

Selection Tool

  1. Create: Click and drag on the PDF page
  2. Move: Drag inside the selection
  3. Resize: Drag edges or corners
  4. Fine-tune: Use arrow keys with modifiers
  5. Measure: See live measurements in status bar

All measurements are in PDF coordinate space (points) and remain accurate at any zoom level.

Export

  1. Create a selection
  2. Press Ctrl+S or click Export button
  3. Choose DPI (150/300/600)
  4. Save as PNG

Auto-reload

Enable "Auto-reload on file change" in Options menu to automatically refresh when the PDF is modified externally. Selection and page position are preserved.

License

MIT

Development

python3 -m pip install -e .[dev]
pytest

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

neoview-0.1.0.tar.gz (22.5 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

neoview-0.1.0-py3-none-any.whl (21.2 kB view details)

Uploaded Python 3

File details

Details for the file neoview-0.1.0.tar.gz.

File metadata

  • Download URL: neoview-0.1.0.tar.gz
  • Upload date:
  • Size: 22.5 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.10.12

File hashes

Hashes for neoview-0.1.0.tar.gz
Algorithm Hash digest
SHA256 38cc4efab3a452f1b9a888b6b756e3f8713dd6b4b8d11785be55c6584151faf8
MD5 3c3669bd36aa94fad38af868303349c1
BLAKE2b-256 43c54a61f5c4a2911581a9ed370bcc668f740a48539fdf1c242aff1eedd08a45

See more details on using hashes here.

File details

Details for the file neoview-0.1.0-py3-none-any.whl.

File metadata

  • Download URL: neoview-0.1.0-py3-none-any.whl
  • Upload date:
  • Size: 21.2 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.10.12

File hashes

Hashes for neoview-0.1.0-py3-none-any.whl
Algorithm Hash digest
SHA256 e9b41b0800c975a8360bd28ae813c44cd25df2292ab255ec9092bcfe3a2183ed
MD5 acbbbcbcbcd0382d529c31453ba9737f
BLAKE2b-256 5f81c74b3e1e698387af4fc547308218b554e92a39529c66a3717a16aeed55d1

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page