😩 Tired of jumping around on a paper when authors cite a figure two million pages away? 😊 Here is a Python utility that extracts images from PDF files and provides an interactive PyQt5-based GUI for viewing them.
- Extract all images from PDF files automatically
- Navigate through images using mouse scroll or keyboard arrows
- Python 3.7+
- pypdf
- PyQt5
- tqdm
git clone git@github.com:tgrassi/figureviewer.git
pip install pypdf PyQt5 tqdm
python viwer.py path/to/your/file.pdfUse mouse wheel to scroll or keyboard arrows.
- Mouse Wheel: Scroll up/down to move between images
- Arrow Keys: Use Up/Down/Left/Right to navigate
- PageUp/PageDown: Navigate images
- Space: Next image
- R: Refresh the current image
- T/A: Toggle always-on-top mode
- X: hide/show window content
- Home: Go to the first image
- End: Go to the last image
- Esc/Q: Quit the application
- H: Show help dialog
python viewer.py path/to/your/file.pdf -b- Extracts images from each PDF page into an
images/folder - Saves images as
image_XXXXXX.pngwith zero-padded numbering - Launches an interactive viewer displaying images one at a time
- Window title shows current image number (e.g., "Fig. 1")