nupdf.gui
nuPDF graphical user interface.
Provides a Form dialog built with PyQt5 that wraps the
nupdf.core functions for merging and rotating PDF/image files.
The UI is divided into four labelled sections:
Input Files — add, reorder, and remove files (drag-and-drop supported).
Options — merge, bookmarks, recto-verso interleaving.
Rotation — optional clockwise rotation by angle and/or page range.
Output — choose where to save the resulting PDF.
Entry point
Call main() to launch the application, or compile to a standalone
executable with PyInstaller:
pyinstaller --onefile --windowed --name="nuPDF" nupdf/gui.py
For a directory-based (faster startup) build:
pyinstaller --onedir --windowed --name="nuPDF" nupdf/gui.py
Attributes
Classes
Main nuPDF dialog window. |
Functions
|
Launch the nuPDF application. |
Module Contents
- nupdf.gui.SUPPORTED_EXTENSIONS = ('.pdf', '.PDF', '.jpg', '.jpeg', '.JPG', '.JPEG', '.png', '.PNG', '.gif', '.GIF', '.raw', '.RAW')[source]
- class nupdf.gui.Form(parent: PyQt5.QtWidgets.QWidget = None)[source]
Bases:
PyQt5.QtWidgets.QDialogMain nuPDF dialog window.
The UI is split into four
QGroupBoxsections:Input Files — add files or a folder, reorder, remove.
Options — merge toggle, bookmark toggle, recto-verso interleaving.
Rotation — clockwise angle and optional page-range filter.
Output — output file path selector.
Drag-and-drop from the OS file manager is supported. Files already present in the list are not added a second time.
- Parameters:
parent – Optional parent widget.
- run() None[source]
Validate inputs, then execute the merge / rotate operation.
Reads all UI controls and calls
merge_pdfs()and/orrotate_pages()as required. The status label is updated at each step. Any error is shown in aQMessageBoxso the window stays open for the user to correct the problem.