Skip to content

使用自签名证书对PDF进行签名并加上可见签章的工具,代码来自https://pengs.top/pdf-sign/

License

Notifications You must be signed in to change notification settings

Micraow/pdf_signer

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

5 Commits
 
 
 
 
 
 
 
 

Repository files navigation

pdf signer

使用自签名证书对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

写的比较简略,但应该能看懂,看不懂的看原文:

https://pengs.top/pdf-sign

文中代码即本仓库stamp.py

致谢

这个小工具使用了开源的pyhanko库。

效果

图片

扫描结果:

demo

我还整了中英双语。

About

使用自签名证书对PDF进行签名并加上可见签章的工具,代码来自https://pengs.top/pdf-sign/

Topics

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Languages