Skip to main content

NeoView PDF viewer with rectangular crop/measure tool

Project description

NeoView

NeoView is a desktop PDF viewer for Linux and Windows built with PySide6 and PyMuPDF. It started as a precise crop and measurement tool, and has grown into a practical technical-PDF viewer with fast reloads, search, bookmarks, annotations, thumbnails, outline navigation, and export workflows.

It is aimed at LaTeX, proofreading, QA, layout review, and document-inspection workflows where you want a lightweight viewer but still need tools beyond simple reading.

Highlights

  • Live PDF reload while external tools rebuild the file
  • Multi-tab viewing with per-document session restore
  • Text find panel with live results, search navigation, and highlight overlays
  • Outline, bookmarks, thumbnails, and page info side panels
  • Measurement and rectangular selection tools with pt, pica, and mm readouts
  • Annotation workflows:
    • highlight, underline, note
    • rectangle, ellipse, text-box, line, arrow, freehand
    • on-canvas drawing and properties editing
    • export a PDF copy with annotations embedded
  • Native PDF annotation visibility in the viewer
  • Font inspection for text under the cursor
  • PNG export from selections at multiple DPI values
  • Keyboard-driven navigation, editing, and selection adjustment
  • Automated test coverage for logic and Qt interaction flows

Repo Overview

Main code areas

Important entry points

Feature Overview

Viewing and navigation

  • Open one or many PDFs in tabs
  • Reuse an already-open tab for the same file
  • Page navigation with page combo, PgUp/PgDn, Home/End
  • Fit Width, Fit Page, Actual Size, custom zoom, Ctrl+wheel, and pinch zoom
  • Rotation controls and fullscreen mode
  • Outline panel for PDF table of contents
  • Thumbnail panel for quick page jumping
  • Page info / document info panel

Search

  • Find panel with live typing updates
  • Explicit next/previous search navigation
  • Highlight overlays for current and visible-page matches
  • Search state preserved per tab
  • Batched search execution to keep the UI responsive on larger PDFs

Selection and measurement

  • Drag to create a selection rectangle
  • Resize by handles or keyboard
  • Move by drag or keyboard
  • Measurements in points, picas, and millimeters
  • Copy measurement values to the clipboard
  • Export selection as PNG at multiple DPI levels

Annotations

  • Create annotations from a selection or directly on the canvas
  • Supported types include:
    • highlight
    • underline
    • note
    • text-box
    • rectangle
    • ellipse
    • line
    • arrow
    • freehand
  • Annotation list with filtering
  • Annotation properties editing
  • Delete annotations from the list, keyboard, or context menu
  • Export annotated PDF copies
  • Read-only viewing of annotations already embedded in the source PDF

Bookmarking and session behavior

  • Add custom bookmarks per document
  • Rename and delete bookmarks
  • Restore last page and zoom per file
  • Auto-reload on file changes for LaTeX / Typst / generated PDF workflows

Requirements

  • Python 3.10+
  • PySide6
  • PyMuPDF

Installation

Install from PyPI

pip install neoview

Install from source

python3 -m pip install .

Editable development install

python3 -m pip install -e .[dev]

Recommended local launcher

./run.sh

This bootstraps a virtual environment and launches NeoView.

Running NeoView

Installed command

neoview
neoview /path/to/document.pdf

Module entry

python -m neoview

Legacy shim

python pdf_crop_measure.py
python pdf_crop_measure.py /path/to/document.pdf

Windows

Install via pip

py -m pip install neoview
neoview

Standalone executable

Tagged releases can include a prebuilt neoview.exe from GitHub Releases.

Build the Windows executable yourself

py -m pip install .[dev]
pyinstaller neoview.spec

Output:

dist\neoview.exe

Docker / Container Usage

Build

docker build -t pdf-measure .

Wayland

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

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
Ctrl+Q Quit
Ctrl+F Find
Ctrl+Shift+F Toggle search panel
Ctrl+Shift+O Toggle navigation panel
Ctrl+Shift+T Toggle thumbnails panel
Ctrl+Shift+I Toggle page info panel
Ctrl+D Add bookmark
Ctrl+Wheel Zoom in or out
W Fit width
F Fit page
Ctrl+1 Actual size
PgUp / PgDn Previous / next page
Home / End First / last page
Ctrl+L / Ctrl+R Rotate left / right
Ctrl+0 Reset rotation
Ctrl+C Copy measurements or selected text context
Ctrl+S Export selection as PNG
Ctrl+Shift+H Add highlight from selection
Ctrl+Shift+U Add underline from selection
Ctrl+Shift+N Add note from selection
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
Delete / Backspace Delete selected annotation
Escape Clear selection

Development

Install dependencies

python3 -m venv .venv
. .venv/bin/activate
python3 -m pip install -e .[dev]

Run tests

PYTHONPATH=src pytest -q

On Windows PowerShell:

$env:PYTHONPATH = "src"
python -m pytest -q

Current automated coverage

  • Unit tests for measurement and state helpers
  • Sidecar persistence tests
  • UI behavior tests for reload, session restore, and navigation
  • pytest-qt interaction tests for:
    • search
    • reload
    • thumbnails
    • outline navigation
    • bookmarks
    • annotation create/edit/delete flows
    • export flows
    • text selection and copy

The suite is intended to stay fast enough for local development and CI.

Packaging

License

MIT

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.2.tar.gz (95.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.2-py3-none-any.whl (81.9 kB view details)

Uploaded Python 3

File details

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

File metadata

  • Download URL: neoview-0.2.tar.gz
  • Upload date:
  • Size: 95.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.2.tar.gz
Algorithm Hash digest
SHA256 122343e17bf3bbb4180753509cfc99a7e03d84a31728aa42d888875cef707223
MD5 a87f8d43228e3ffa9d15f778e0e6535b
BLAKE2b-256 eef34fa235b739fe49528dc4e0557a204946ca54605a5aab02d6e98d34f519dc

See more details on using hashes here.

File details

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

File metadata

  • Download URL: neoview-0.2-py3-none-any.whl
  • Upload date:
  • Size: 81.9 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.2-py3-none-any.whl
Algorithm Hash digest
SHA256 c662633e47cf47049827cd91c0ff3cdf8b67f8e94c39db84f7679bbb2ea163f1
MD5 8cac1734c0c8acb4816bbe0cfa36236e
BLAKE2b-256 3603ba5d63a5ff104ec63ec6d357e0bc517e746d5181ca5e3f15c838be057b6e

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