schorschii / simple-signer Goto Github PK
View Code? Open in Web Editor NEWSign and certify PDF files on Linux with optional visual stamp using a .p12/.pfx certificate file
License: GNU General Public License v3.0
Sign and certify PDF files on Linux with optional visual stamp using a .p12/.pfx certificate file
License: GNU General Public License v3.0
According to Unix / Linux basedir specs or StackOverflow discussion user based configuration files should be stored inside the .config
directory of the user home directory and maybe in its own subdirectory of .config
.
So instead of storing the settings in ~/.simple-signer.ini
the settings could be moved to f.e. ~/.config/Simple-Signer/settings.ini
.
...not necessarily in the GUI, but in the config file ~/.simple-signer.ini
<class 'IndexError'>: list index out of range
I get this error after having clicked on "Sign" and having chosen where to save.
I'm trying to compile following the README notes that say:
pyinstaller.exe -F --noconsole simple-signer.py --add-data="lang/de.qm;lang" --add-data="C:\Users\vm2\AppData\Roaming\Python\Python38\site-packages\endesive\pdf\PyPDF2_annotate\fonts\Helvetica.ttf;endesive/pdf/PyPDF2_annotate/fonts"
simply-signer.py
has to be switched by setup.py
. If I run the command with simple-signer.py
both in the root folder or inside the simple-signer
folder, it returns a not found
errorpip
the libraries endesive
and PyMuPDF
and PyQt5
de.qm
to de.ts
because there is no de.qm
file there.So with these, I have run the compiler and these are the results.
pyinstaller.exe -F --noconsole setup.py --add-data="lang/de.ts;lang" --add-data="C:\Users\user\AppData\Local\Packages\PythonSoftwareFoundation.Python.3.11_qbz5n2kfra8p0\LocalCache\local-packages\Python311\site-packages\endesive\pdf\PyPDF2_annotate\fonts\Helvetica.ttf;endesive/pdf/PyPDF2_annotate/fonts"
213 INFO: PyInstaller: 6.3.0
213 INFO: Python: 3.11.7
219 INFO: Platform: Windows-10-10.0.22631-SP0
219 INFO: wrote C:\Users\user\Simple-Signer\setup.spec
221 INFO: Extending PYTHONPATH with paths
['C:\\Users\\user\\Desarrollo\\Learning\\Simple-Signer']
384 INFO: Appending 'datas' from .spec
384 INFO: checking Analysis
385 INFO: Building Analysis because Analysis-00.toc is non existent
385 INFO: Initializing module dependency graph...
386 INFO: Caching module graph hooks...
404 INFO: Analyzing base_library.zip ...
1320 INFO: Loading module hook 'hook-encodings.py' from 'C:\\Users\\user\\AppData\\Local\\Packages\\PythonSoftwareFoundation.Python.3.11_qbz5n2kfra8p0\\LocalCache\\local-packages\\Python311\\site-packages\\PyInstaller\\hooks'...
2151 INFO: Loading module hook 'hook-pickle.py' from 'C:\\Users\\user\\AppData\\Local\\Packages\\PythonSoftwareFoundation.Python.3.11_qbz5n2kfra8p0\\LocalCache\\local-packages\\Python311\\site-packages\\PyInstaller\\hooks'...
2828 INFO: Loading module hook 'hook-heapq.py' from 'C:\\Users\\user\\AppData\\Local\\Packages\\PythonSoftwareFoundation.Python.3.11_qbz5n2kfra8p0\\LocalCache\\local-packages\\Python311\\site-packages\\PyInstaller\\hooks'...
3049 INFO: Caching module dependency graph...
3103 INFO: Running Analysis Analysis-00.toc
3103 INFO: Looking for Python shared library...
3103 INFO: Using Python shared library: C:\Program Files\WindowsApps\PythonSoftwareFoundation.Python.3.11_3.11.2032.0_x64__qbz5n2kfra8p0\python311.dll
3103 INFO: Analyzing C:\Users\user\Simple-Signer\setup.py
3104 INFO: Processing pre-safe import module hook distutils from 'C:\\Users\\user\\AppData\\Local\\Packages\\PythonSoftwareFoundation.Python.3.11_qbz5n2kfra8p0\\LocalCache\\local-packages\\Python311\\site-packages\\PyInstaller\\hooks\\pre_safe_import_module\\hook-distutils.py'.
3108 INFO: Processing pre-find module path hook distutils from 'C:\\Users\\user\\AppData\\Local\\Packages\\PythonSoftwareFoundation.Python.3.11_qbz5n2kfra8p0\\LocalCache\\local-packages\\Python311\\site-packages\\PyInstaller\\hooks\\pre_find_module_path\\hook-distutils.py'.
3467 INFO: Loading module hook 'hook-distutils.py' from 'C:\\Users\\user\\AppData\\Local\\Packages\\PythonSoftwareFoundation.Python.3.11_qbz5n2kfra8p0\\LocalCache\\local-packages\\Python311\\site-packages\\PyInstaller\\hooks'...
3507 INFO: Loading module hook 'hook-distutils.util.py' from 'C:\\Users\\user\\AppData\\Local\\Packages\\PythonSoftwareFoundation.Python.3.11_qbz5n2kfra8p0\\LocalCache\\local-packages\\Python311\\site-packages\\PyInstaller\\hooks'...
3542 INFO: Loading module hook 'hook-sysconfig.py' from 'C:\\Users\\user\\AppData\\Local\\Packages\\PythonSoftwareFoundation.Python.3.11_qbz5n2kfra8p0\\LocalCache\\local-packages\\Python311\\site-packages\\PyInstaller\\hooks'...
3656 INFO: Loading module hook 'hook-setuptools.py' from 'C:\\Users\\user\\AppData\\Local\\Packages\\PythonSoftwareFoundation.Python.3.11_qbz5n2kfra8p0\\LocalCache\\local-packages\\Python311\\site-packages\\PyInstaller\\hooks'...
4870 INFO: Loading module hook 'hook-pkg_resources.py' from 'C:\\Users\\user\\AppData\\Local\\Packages\\PythonSoftwareFoundation.Python.3.11_qbz5n2kfra8p0\\LocalCache\\local-packages\\Python311\\site-packages\\PyInstaller\\hooks'...
5620 INFO: Loading module hook 'hook-platform.py' from 'C:\\Users\\user\\AppData\\Local\\Packages\\PythonSoftwareFoundation.Python.3.11_qbz5n2kfra8p0\\LocalCache\\local-packages\\Python311\\site-packages\\PyInstaller\\hooks'...
5653 INFO: Loading module hook 'hook-xml.py' from 'C:\\Users\\user\\AppData\\Local\\Packages\\PythonSoftwareFoundation.Python.3.11_qbz5n2kfra8p0\\LocalCache\\local-packages\\Python311\\site-packages\\PyInstaller\\hooks'...
5765 INFO: Loading module hook 'hook-packaging.py' from 'C:\\Users\\user\\AppData\\Local\\Packages\\PythonSoftwareFoundation.Python.3.11_qbz5n2kfra8p0\\LocalCache\\local-packages\\Python311\\site-packages\\PyInstaller\\hooks'...
6241 INFO: Processing module hooks...
6250 INFO: Processing pre-safe import module hook win32com from 'C:\\Users\\user\\AppData\\Local\\Packages\\PythonSoftwareFoundation.Python.3.11_qbz5n2kfra8p0\\LocalCache\\local-packages\\Python311\\site-packages\\_pyinstaller_hooks_contrib\\hooks\\pre_safe_import_module\\hook-win32com.py'.
6835 INFO: Loading module hook 'hook-multiprocessing.util.py' from 'C:\\Users\\user\\AppData\\Local\\Packages\\PythonSoftwareFoundation.Python.3.11_qbz5n2kfra8p0\\LocalCache\\local-packages\\Python311\\site-packages\\PyInstaller\\hooks'...
7024 INFO: Loading module hook 'hook-setuptools.msvc.py' from 'C:\\Users\\user\\AppData\\Local\\Packages\\PythonSoftwareFoundation.Python.3.11_qbz5n2kfra8p0\\LocalCache\\local-packages\\Python311\\site-packages\\PyInstaller\\hooks'...
7381 INFO: Loading module hook 'hook-difflib.py' from 'C:\\Users\\user\\AppData\\Local\\Packages\\PythonSoftwareFoundation.Python.3.11_qbz5n2kfra8p0\\LocalCache\\local-packages\\Python311\\site-packages\\PyInstaller\\hooks'...
7742 INFO: Loading module hook 'hook-setuptools._distutils.command.check.py' from 'C:\\Users\\user\\AppData\\Local\\Packages\\PythonSoftwareFoundation.Python.3.11_qbz5n2kfra8p0\\LocalCache\\local-packages\\Python311\\site-packages\\PyInstaller\\hooks'...
7928 INFO: Performing binary vs. data reclassification (4 entries)
7933 INFO: Looking for ctypes DLLs
7968 INFO: Analyzing run-time hooks ...
7971 INFO: Including run-time hook 'C:\\Users\\user\\AppData\\Local\\Packages\\PythonSoftwareFoundation.Python.3.11_qbz5n2kfra8p0\\LocalCache\\local-packages\\Python311\\site-packages\\PyInstaller\\hooks\\rthooks\\pyi_rth_inspect.py'
7976 INFO: Including run-time hook 'C:\\Users\\user\\AppData\\Local\\Packages\\PythonSoftwareFoundation.Python.3.11_qbz5n2kfra8p0\\LocalCache\\local-packages\\Python311\\site-packages\\PyInstaller\\hooks\\rthooks\\pyi_rth_setuptools.py'
7981 INFO: Including run-time hook 'C:\\Users\\user\\AppData\\Local\\Packages\\PythonSoftwareFoundation.Python.3.11_qbz5n2kfra8p0\\LocalCache\\local-packages\\Python311\\site-packages\\PyInstaller\\hooks\\rthooks\\pyi_rth_pkgutil.py'
7986 INFO: Processing pre-find module path hook _pyi_rth_utils from 'C:\\Users\\user\\AppData\\Local\\Packages\\PythonSoftwareFoundation.Python.3.11_qbz5n2kfra8p0\\LocalCache\\local-packages\\Python311\\site-packages\\PyInstaller\\hooks\\pre_find_module_path\\hook-_pyi_rth_utils.py'.
7993 INFO: Loading module hook 'hook-_pyi_rth_utils.py' from 'C:\\Users\\user\\AppData\\Local\\Packages\\PythonSoftwareFoundation.Python.3.11_qbz5n2kfra8p0\\LocalCache\\local-packages\\Python311\\site-packages\\PyInstaller\\hooks'...
7995 INFO: Including run-time hook 'C:\\Users\\user\\AppData\\Local\\Packages\\PythonSoftwareFoundation.Python.3.11_qbz5n2kfra8p0\\LocalCache\\local-packages\\Python311\\site-packages\\PyInstaller\\hooks\\rthooks\\pyi_rth_multiprocessing.py'
8000 INFO: Including run-time hook 'C:\\Users\\user\\AppData\\Local\\Packages\\PythonSoftwareFoundation.Python.3.11_qbz5n2kfra8p0\\LocalCache\\local-packages\\Python311\\site-packages\\PyInstaller\\hooks\\rthooks\\pyi_rth_pkgres.py'
8010 INFO: Looking for dynamic libraries
8274 INFO: Extra DLL search directories (AddDllDirectory): []
8274 INFO: Extra DLL search directories (PATH): []
8371 INFO: Warnings written to C:\Users\user\Simple-Signer\build\setup\warn-setup.txt
8401 INFO: Graph cross-reference written to C:\Users\user\Simple-Signer\build\setup\xref-setup.html
8434 INFO: checking PYZ
8434 INFO: Building PYZ because PYZ-00.toc is non existent
8434 INFO: Building PYZ (ZlibArchive) C:\Users\user\Simple-Signer\build\setup\PYZ-00.pyz
8900 INFO: Building PYZ (ZlibArchive) C:\Users\user\Simple-Signer\build\setup\PYZ-00.pyz completed successfully.
8907 INFO: checking PKG
8907 INFO: Building PKG because PKG-00.toc is non existent
8907 INFO: Building PKG (CArchive) setup.pkg
10267 INFO: Building PKG (CArchive) setup.pkg completed successfully.
10268 INFO: Bootloader C:\Users\user\AppData\Local\Packages\PythonSoftwareFoundation.Python.3.11_qbz5n2kfra8p0\LocalCache\local-packages\Python311\site-packages\PyInstaller\bootloader\Windows-64bit-intel\runw.exe
10268 INFO: checking EXE
10269 INFO: Building EXE because EXE-00.toc is non existent
10269 INFO: Building EXE from EXE-00.toc
10269 INFO: Copying bootloader EXE to C:\Users\user\Simple-Signer\dist\setup.exe
10272 INFO: Copying icon to EXE
10275 INFO: Copying 0 resources to EXE
10275 INFO: Embedding manifest in EXE
10278 INFO: Appending PKG archive to EXE
10284 INFO: Fixing EXE headers
10345 INFO: Building EXE from EXE-00.toc completed successfully.
Then I run /dist/setup.exe
And here is the result:
What I could be missing?
If I use draw stamps it doesnt fails in [AttributeError: module 'PIL.ImageQt' has no attribute 'ImageQt']
Inside python it can use it
Hi,
First of all I have to thank you for the great application!
It does exactly what it is supposed to do.
Are there any plans to maintain an AUR package for Arch-based Linux distributions?
I think this would make it easier for more people to use the application.
Thanks in advance and best regards!
If do certification insted of the sign. cert check fails, because the date was written when date was parsed, and the write file date is written later in the system, which lead that file was rewritten after certification
(proposed by @henning-gerhardt )
When trying to install on Debian Trixie there is a problem with the new way the pip packages are handled.
To my understanding system wide installation with pip is not possible anymore.
Way to reproduce:
sudo apt-get install ./Downloads/simple-signer.deb
simple-signer
Output
$ sudo apt-get install ./Downloads/simple-signer.deb
Reading package lists... Done
Building dependency tree... Done
Reading state information... Done
Note, selecting 'simple-signer' instead of './Downloads/simple-signer1.deb'
The following package was automatically installed and is no longer required:
libnfs13
Use 'sudo apt autoremove' to remove it.
The following NEW packages will be installed:
simple-signer
0 upgraded, 1 newly installed, 0 to remove and 1 not upgraded.
Need to get 0 B/8.236 B of archives.
After this operation, 0 B of additional disk space will be used.
Get:1 /home/ba4my2/Downloads/simple-signer1.deb simple-signer all 1.5.0-2 [8.236 B]
Selecting previously unselected package simple-signer.
(Reading database ... 656287 files and directories currently installed.)
Preparing to unpack .../Downloads/simple-signer1.deb ...
Unpacking simple-signer (1.5.0-2) ...
Setting up simple-signer (1.5.0-2) ...
error: externally-managed-environment
× This environment is externally managed
╰─> To install Python packages system-wide, try apt install
python3-xyz, where xyz is the package you are trying to
install.
If you wish to install a non-Debian-packaged Python package,
create a virtual environment using python3 -m venv path/to/venv.
Then use path/to/venv/bin/python and path/to/venv/bin/pip. Make
sure you have python3-full installed.
If you wish to install a non-Debian packaged Python application,
it may be easiest to use pipx install xyz, which will manage a
virtual environment for you. Make sure you have pipx installed.
See /usr/share/doc/python3.11/README.venv for more information.
note: If you believe this is a mistake, please contact your Python installation or OS distribution provider. You can override this, at the risk of breaking your Python installation or OS, by passing --break-system-packages.
hint: See PEP 668 for the detailed specification.
dpkg: error processing package simple-signer (--configure):
installed simple-signer package post-installation script subprocess returned error exit status 1
Processing triggers for desktop-file-utils (0.26-1) ...
Processing triggers for mailcap (3.70+nmu1) ...
Errors were encountered while processing:
simple-signer
E: Sub-process /usr/bin/dpkg returned an error code (1)
So right now Simple signer is installed but can't run missing endesive.
$ simple-signer
Traceback (most recent call last):
File "/usr/bin/simple-signer", line 15, in <module>
from endesive.pdf import cms
ModuleNotFoundError: No module named 'endesive'
I generated a nist p256 key and self signed certificate using openssl, however I cannot use it in simple signer due to error at the last step:
<class 'TypeError'>: _EllipticCurvePrivateKey.sign() takes 3 positional arguments but 4 were given
Using python 3.10, Linux Mint 21 based on Ubuntu 22.04
The same certificate can be used in Thunderbird or Firefox NSS and then used in LibreOffice to sign ODT or PDF exported from Libreoffice.
When I created a certificate based on RSA2048 using Actalis it is able to perform the signing without error.
Dear developers,
would it be possible to implement a validation check of the certificate which is used for signing?
Thanks for your attention,
Ciao
Veit
A declarative, efficient, and flexible JavaScript library for building user interfaces.
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google ❤️ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.