使用自签名证书对PDF进行签名并加上可见签章的工具,代码来自https://pengs.top/pdf-sign/
适用于Windows, Mac OS X,Linux
以下内容原文来自Peng's Blog
下载本仓库代码
pip install pip install pyhanko[opentype]
openssl genrsa -aes128 -out myself.key 2048
openssl req -new -days 365 -key myself.key -out myself.csr
openssl x509 -in myself.csr -out myself.crt -req -signkey myself.key -days 365
openssl pkcs12 -export -out myself.pfx -inkey myself.key -in myself.crt
针对stamp.py开头的信息以及字体位置进行修改。
python stamp.py
写的比较简略,但应该能看懂,看不懂的看原文:
文中代码即本仓库stamp.py
这个小工具使用了开源的pyhanko
库。
扫描结果:
我还整了中英双语。