# py-pdftools, which edits PDF documents: annotates, redacts, labels, stamps, arranges and imposes them. # Copyright (C) 2026 Nicolas Vaughan # # This program is free software: you can redistribute it and/or modify it # under the terms of the GNU General Public License as published by the # Free Software Foundation, either version 3 of the License, or (at your # option) any later version. This program is distributed WITHOUT ANY # WARRANTY; see the LICENSE file, or . # # Build with packaging/build-rpm.sh, which makes the source tarball. Name: py-pdftools Version: 1.35.0 Release: 1%{?dist} Summary: Edit PDF documents: annotate, redact, label, stamp, arrange and impose their pages License: GPL-3.0-or-later URL: https://github.com/nivaca/py-pdftools Source0: %{name}-%{version}.tar.gz BuildArch: noarch BuildRequires: python3-devel BuildRequires: desktop-file-utils BuildRequires: /usr/bin/appstreamcli # For %%check: the tests run the window (headless). BuildRequires: python3-pytest BuildRequires: python3-pyside6 # (the tests of imposition check each result with qpdf, and some tests read pages with pdftotext) BuildRequires: qpdf BuildRequires: poppler-utils # (the tests of OCR read scans with it) BuildRequires: tesseract BuildRequires: tesseract-langpack-eng # PyMuPDF, pikepdf and reportlab come from the package's metadata (pyproject.toml). # The window: Fedora's PySide6 (pyproject.toml names the PyPI wheel, pyside6-essentials). Requires: python3-pyside6 # (for copies as PDF/A and PDF/X: Ghostscript makes them, for the pdf2iso py-pdftools includes) Recommends: ghostscript Requires: hicolor-icon-theme # (for OCR: the tesseract program, and its English; the other languages as needed) Recommends: tesseract Recommends: tesseract-langpack-eng # (for the spelling of what is written in annotations: enchant, with the hunspell dictionaries) Recommends: python3-enchant # (for documents exported as Word, ODT, EPUB, LaTeX, and made PDFs: Pandoc, and LuaLaTeX for the PDFs) Suggests: pandoc # (Poppler's pdftoppm, one of the engines that can draw the pages; PDFium comes with Fedora's Qt PDF) Suggests: poppler-utils # (for File > New > New PDF from a scanner: SANE's scanimage and its drivers) Suggests: sane-backends Suggests: sane-backends-drivers-scanners Suggests: texlive-luatex %description py-pdftools edits PDF documents. It brings together, in one window and one command line, five programs: py-annotate (highlights, notes, text boxes, shapes, drawings and stamps, written as ordinary PDF annotations), py-redact (boxes over what is to be removed, and a redacted copy in which it is removed for good, and checked), py-foliation (page labels, headers and footers, watermarks, the view when the document is opened, and the order of the pages), py-imposition (booklets, n-up, step and repeat and the rest of imposition for printing, with sequences and hot folders) and py-pdfocr (the text of scanned pages, read by tesseract and written under them). The window and the command line are in English or Spanish. %prep %autosetup -n %{name}-%{version} # (Fedora's PySide6 is python3-pyside6, which doesn't provide pyside6-essentials) sed -i '/"pyside6-essentials/d' pyproject.toml %generate_buildrequires %pyproject_buildrequires %build %pyproject_wheel %install %pyproject_install %pyproject_save_files -l py_pdftools desktop-file-install --dir=%{buildroot}%{_datadir}/applications packaging/py-pdftools.desktop install -d %{buildroot}%{_datadir}/icons cp -pr src/py_pdftools/icons/linux/hicolor %{buildroot}%{_datadir}/icons/ install -Dpm 0644 packaging/io.github.nivaca.py-pdftools.metainfo.xml \ %{buildroot}%{_metainfodir}/io.github.nivaca.py-pdftools.metainfo.xml install -Dpm 0644 packaging/man/py-pdftools.1 %{buildroot}%{_mandir}/man1/py-pdftools.1 install -Dpm 0644 packaging/man/es/py-pdftools.1 %{buildroot}%{_mandir}/es/man1/py-pdftools.1 %check desktop-file-validate %{buildroot}%{_datadir}/applications/py-pdftools.desktop appstreamcli validate --no-net %{buildroot}%{_metainfodir}/io.github.nivaca.py-pdftools.metainfo.xml %pyproject_check_import -e 'py_pdftools.gui*' # The whole test suite, on the installed package, with no settings of the # builder's and the window drawn offscreen: each test file in a pytest of its # own, as many at once as there are processors (tools/test.py). One pytest # for them all took 11 minutes, and minutes more to quit, deleting what the # desktop's style kept of every window drawn. export HOME="$PWD/check-home" PY_PDFTOOLS_CONFIG="$PWD/check-home/config" QT_QPA_PLATFORM=offscreen %{py3_test_envvars} %{python3} tools/test.py %{py3_test_envvars} %{buildroot}%{_bindir}/py-pdftools --version | grep -q '%{version}' %{py3_test_envvars} %{buildroot}%{_bindir}/py-pdftools-gui --version | grep -q '%{version}' %files -f %{pyproject_files} %doc README.md README_es.md docs/DESCRIPTION.md docs/DESCRIPCIƓN_es.md %{_bindir}/py-pdftools %{_bindir}/py-pdftools-gui %{_datadir}/applications/py-pdftools.desktop %{_datadir}/icons/hicolor/*/apps/py-pdftools.* %{_metainfodir}/io.github.nivaca.py-pdftools.metainfo.xml %{_mandir}/man1/py-pdftools.1* %lang(es) %{_mandir}/es/man1/py-pdftools.1* %changelog * Mon Nov 30 2026 Nicolas Vaughan - 1.35.0-1 - Version 1.35.0: see CHANGELOG.md * Mon Nov 30 2026 Nicolas Vaughan - 1.34.0-1 - Version 1.34.0: see CHANGELOG.md * Mon Nov 30 2026 Nicolas Vaughan - 1.33.0-1 - Version 1.33.0: see CHANGELOG.md * Sun Nov 29 2026 Nicolas Vaughan - 1.32.0-1 - Version 1.32.0: see CHANGELOG.md * Sun Nov 29 2026 Nicolas Vaughan - 1.31.0-1 - Bookmarks as text and a contents page; OCR again; own comments; Clear the list; Help > What's new * Sun Nov 29 2026 Nicolas Vaughan - 1.30.0-1 - OCR text in any script; left panel closed and opened from its border; faster annotations and comparison; installers prefer wheels * Sun Nov 29 2026 Nicolas Vaughan - 1.29.1-1 - Installers prefer Python 3.14 (lxml has no Windows wheel for 3.15); a macOS test fixed * Sun Nov 29 2026 Nicolas Vaughan - 1.29.0-1 - Revert, F11 from the page in view, 3-6 pages across, LaTeX formula stamps, text by columns; faster * Sun Nov 29 2026 Nicolas Vaughan - 1.28.1-1 - No crash at exit after copying a table (1.28.0's %check failed on Copr there) - SyncTeX editor commands with quotes work on Windows * Sun Nov 29 2026 Nicolas Vaughan - 1.28.0-1 - Tables, OCR words and cleaning, snapshots, spelling, start screen, SyncTeX - Black and white scans, object inspector, photographs straightened - Accessibility check, ask about the selection, Select objects tool - Clean scanned pages, caret navigation, scanning with SANE * Sun Nov 29 2026 Nicolas Vaughan - 1.27.1-1 - Help on every page of Settings, in English and Spanish * Sun Nov 29 2026 Nicolas Vaughan - 1.27.0-1 - Overlay and underlay, crops in the file, link previews, reading bar, e-books, reading colours keeping hues, stroke stabilizer, settings resets * Sat Nov 28 2026 Nicolas Vaughan - 1.26.0-1 - Paging by screens, halfway jumps, marks, link letters, chapter and near search, web look-up, layers panel, picture of an area, selection toolbar, grey/CMYK and outlined copies, file check and repair, layout kept per document * Sat Nov 28 2026 Nicolas Vaughan - 1.25.0-1 - Linearized copies (fast web view), in Save a copy and pdf-version --linearize * Fri Nov 27 2026 Nicolas Vaughan - 1.24.0-1 - Engines that draw the pages (MuPDF, PDFium, Poppler), chosen in the settings or asked on opening; a faster start; credits to the projects it learnt from * Fri Nov 27 2026 Nicolas Vaughan - 1.23.0-1 - Settings > Annotations; annotations exported for Skim (.skim); with Pandoc, documents exported (Word, ODT, EPUB, HTML, LaTeX) and made PDFs * Fri Nov 27 2026 Nicolas Vaughan - 1.22.1-1 - Version 1.22.1: Escape in the fields of the panel Annotations keeps the tags and the reply typed in an active window (1.22.0's %check failed on it); with the changes of 1.22.0 * Fri Nov 27 2026 Nicolas Vaughan - 1.22.0-1 - Version 1.22.0: annotations flattened in the document or a copy, all or some, with their comments in the margin; pages copied or moved to a new PDF; Escape keeps what was written and leaves the tool; the separate files of annotations hidden; plainer questions * Thu Nov 26 2026 Nicolas Vaughan - 1.21.0-1 - Version 1.21.0: annotations in a separate file beside the PDF (book.pdf.pdfnotes), switchable both ways without loss; Skim's .skim notes imported * Thu Nov 26 2026 Nicolas Vaughan - 1.20.0-1 - Version 1.20.0: faster pages and thumbnails (warm processes, thumbnails on disk), plain-text exports, a warning before closing several documents, recent documents in new tabs, the view kept when saving, and fixes * Wed Nov 25 2026 Nicolas Vaughan - 1.19.0-1 - Version 1.19.0: themes (Nord, Solarized, Sepia) and icon themes to choose, read aloud, a note's pop-up, attached programs not opened, errors shown, quotes found as printed, and fixes * Wed Nov 25 2026 Nicolas Vaughan - 1.18.1-1 - Version 1.18.1: Ctrl+Q and Ctrl+W named explicitly (Quit had lost Ctrl+Q where the platform has no standard key for it). * Wed Nov 25 2026 Nicolas Vaughan - 1.18.0-1 - Version 1.18.0: Help > Reset all settings (with a dated copy); Ctrl+W closes the document only, Alt+F4 quits; Reduced file size no longer turns white shapes black (pictures redrawn without rewriting page content). * Wed Nov 25 2026 Nicolas Vaughan - 1.17.0-1 - Version 1.17.0: File > Save a copy > With pages as pictures, and py-pdftools rasterize (pages made pictures, without text, opened in a new tab); the part Textual criticism of an annotation's properties folded. * Wed Nov 25 2026 Nicolas Vaughan - 1.16.0-1 - Version 1.16.0: installers for Windows and macOS; the menu Annotate in submenus; a sign for comments; annotations readable on scanned pages and on pages with a /UserUnit; note icons of one size at any zoom; the options in the user manuals print with their two hyphens * Tue Nov 24 2026 Nicolas Vaughan - 1.15.0-1 - Version 1.15.0: every search fast, Find all without freezing, the OCR mode at once, --no-tray * Tue Nov 24 2026 Nicolas Vaughan - 1.14.0-1 - Version 1.14.0: signing said plainly, handwritten signatures from pictures, My signatures, the picture in a digital signature * Mon Nov 23 2026 Nicolas Vaughan - 1.13.0-1 - Version 1.13.0: Find menu, Find as you type from the top, toolbars by kinds of work, Reset the toolbars, Apply in Settings * Mon Nov 23 2026 Nicolas Vaughan - 1.12.1-1 - Version 1.12.1: Find as you type alone at the bottom, and instantaneous * Mon Nov 23 2026 Nicolas Vaughan - 1.12.0-1 - Version 1.12.0: Find as you type * Mon Nov 23 2026 Nicolas Vaughan - 1.11.0-1 - Version 1.11.0: page sorter, Tools menu, steps on several files, History panel, stamps of one's own * Mon Nov 23 2026 Nicolas Vaughan - 1.10.1-1 - Version 1.10.1: the test of the attached files passes on Windows. * Mon Nov 23 2026 Nicolas Vaughan - 1.10.0-1 - Version 1.10.0: a panel of attached files (F9): those of the document and of its pages, to open, save, add or remove them; the signing tests on macOS keep gpg's folders under /tmp * Mon Nov 23 2026 Nicolas Vaughan - 1.9.0-1 - Version 1.9.0: Okular's keys where they do the same (F7, F3, /, Ctrl+Shift+P, B); Ctrl+B and next/previous bookmark; reopen a closed tab and Alt+Shift+N; copy text without line breaks; the Magnifier; trimmed margins; a panel of search results; a command palette; visual comparison of two PDFs; accessibility: names for screen readers, panel to panel with Ctrl+F6, a high-contrast theme * Mon Nov 23 2026 Nicolas Vaughan - 1.8.18-1 - Version 1.8.18: the toolbars of a row stay together; a spacer in Customize the toolbars; wider handles. * Sun Nov 22 2026 Nicolas Vaughan - 1.8.17-1 - Every release signed: each file, SHA256SUMS and the tag * Sun Nov 22 2026 Nicolas Vaughan - 1.8.16-1 - Zoom up to 10000 %; a list of OCR languages to download * Sun Nov 22 2026 Nicolas Vaughan - 1.8.15-1 - One configuration file; "the tabbar"; shorter, usual names for about ninety menu items, panels, tools and settings * Sun Nov 22 2026 Nicolas Vaughan - 1.8.14-1 - Start with the session on Windows through the registry; on macOS, PDFs from the Finder and the Dock, and a black icon in the menu bar; a test that crashed the build of 1.8.13 is mended * Sun Nov 22 2026 Nicolas Vaughan - 1.8.13-1 - The toolbars at first in one row, with small icons; toolbars dragged out of a window in tabs hide with their tab * Sun Nov 22 2026 Nicolas Vaughan - 1.8.12-1 - A quicker start; documents with many links open faster; Help > Check for a new version; the Windows installer takes --uninstall and the like * Sun Nov 22 2026 Nicolas Vaughan - 1.8.11-1 - Word index also on the toolbar Find, with an icon of its own * Sun Nov 22 2026 Nicolas Vaughan - 1.8.10-1 - pyHanko installed with pip --user is found by the RPM; Check the configuration in Help and on the settings' buttons; colours shown as colours; animated zoom keeps its point * Sun Nov 22 2026 Nicolas Vaughan - 1.8.9-1 - Left and Right turn the pages; icon themes found by their exact name on Windows and macOS * Sat Nov 21 2026 Nicolas Vaughan - 1.8.8-1 - Light and dark themes that work under KDE; faster long documents; animated zoom and smooth wheel; one page box; Windows rename retries * Sat Nov 21 2026 Nicolas Vaughan - 1.8.7-1 - Check the configuration reports OCR languages not installed instead of failing * Sat Nov 21 2026 Nicolas Vaughan - 1.8.6-1 - Centered thumbnails; labels or numbers, not both; configuration check; OpenGL drawing option; F5 in Impose * Sat Nov 21 2026 Nicolas Vaughan - 1.8.5-1 - Bookmarks hidden until asked for; tooltips always on the toolbars; quick find box; room before the page count * Sat Nov 21 2026 Nicolas Vaughan - 1.8.4-1 - A Debian package for Debian 12, Ubuntu 22.04 and later, made from the AppImage * Sat Nov 21 2026 Nicolas Vaughan - 1.8.3-1 - Version 1.8.3: on Windows, protecting a document open and the CSVs of forms; the tests pass again on GitHub. * Sat Nov 21 2026 Nicolas Vaughan - 1.8.2-1 - Version 1.8.2: a change of the toolbars reaches every window open. * Sat Nov 21 2026 Nicolas Vaughan - 1.8.1-1 - Version 1.8.1: OCR from the thumbnails in every mode; extracted pages open in a new tab. * Sat Nov 21 2026 Nicolas Vaughan - 1.8.0-1 - Version 1.8.0: Word index (from pdf-word-finder) and the command find-words; the toolbar Page and zoom; a setting for the bar of the tabs; the Settings tabs scroll; no field for another pdf2iso; Previous and Next page only on Page navigation. * Sat Nov 21 2026 Nicolas Vaughan - 1.7.0-1 - Version 1.7.0: the toolbar Page navigation; File > PDF properties; sharper text (an unsharp mask); hints and tooltips off at first; an index in the user manuals. * Sat Nov 21 2026 Nicolas Vaughan - 1.6.2-1 - Version 1.6.2: the user manual, in English and Spanish, with pictures (docs/MANUAL_en.pdf, docs/MANUAL_es.pdf). * Sat Nov 21 2026 Nicolas Vaughan - 1.6.1-1 - Version 1.6.1: sharper text on the pages (a setting); the list of the open-source software used * Sat Nov 21 2026 Nicolas Vaughan - 1.6.0-1 - Version 1.6.0: starting with the session, in the tray; a window kept ready; Settings > Appearance and Documents; fixes * Sat Nov 21 2026 Nicolas Vaughan - 1.5.0-1 - Version 1.5.0: menus in groups; toolbars set up as in KDE; exports of pages, pictures and text; splitting at bookmarks and by size; the PDF version * Fri Nov 20 2026 Nicolas Vaughan - 1.4.0-1 - Version 1.4.0: smaller copies; links made and changed; forms filled in, with their formats and sums, and their data; digital signatures (with pyHanko, when it is installed) * Fri Nov 20 2026 Nicolas Vaughan - 1.3.0-1 - Version 1.3.0: combining files; new PDFs from pictures * Fri Nov 20 2026 Nicolas Vaughan - 1.2.0-1 - Version 1.2.0: security (text only covered, hidden layers, passwords); icons on the buttons of the modes; editable toolbars * Fri Nov 20 2026 Nicolas Vaughan - 1.1.0-1 - Version 1.1.0: moving through a document (bookmarks, links, history, views, tabs, reloading) * Fri Nov 20 2026 Nicolas Vaughan - 1.0.0-1 - The mode OCR and its languages; the tool Select text; running in the background; Settings > Performance; the menu of pages in groups * Fri Nov 20 2026 Nicolas Vaughan - 0.5.0-1 - Several thumbnails chosen at once, with the menu of pages in any mode; the page box shows page labels; a manager of OCR languages * Fri Nov 20 2026 Nicolas Vaughan - 0.4.0-1 - OCR with the tesseract program, into the document; the hints of the modes over the pages * Fri Nov 20 2026 Nicolas Vaughan - 0.3.0-1 - Large documents: several rendering processes, a time limit per page, thumbnails only near view, deep zoom in tiles, working copies on disk * Fri Nov 20 2026 Nicolas Vaughan - 0.2.0-1 - Modes Read, Redact, Annotate, Foliate and Impose, each with its own arrangement of the window; pdf2iso included (only Ghostscript is needed for PDF/A and PDF/X); fixes, and the duplicated code joined * Fri Nov 20 2026 Nicolas Vaughan - 0.1.0-2 - The tests need qpdf and pdftotext to build (Copr) * Thu Nov 19 2026 Nicolas Vaughan - 0.1.0-1 - First package: py-annotate, py-redact, py-foliation and py-imposition in one window, with the modes Annotate, Redact, Pages and Impose, and one command line (py-pdftools)