edocseal template templates/原始模板.pdf -t runtime/模板表单.pdf
docker build -t liasica/edocseal ./docker/Dockerfile
pip install 'urllib3<2.0'
pip install pyHanko
pip install 'pyHanko[pkcs11,image-support,opentype,xmp,opentype,image-support]'
# 136
pyhanko sign addfields --field -1/70,320,206,456/AUR-SIGN --field -1/242,343,317,419/RIDER-SIGN input.pdf input-s.pdf
pyhanko sign addsig --field AUR-SIGN pemder --key privkey.pem --cert cert.pem --no-pass input-s.pdf output.pdf
pyhanko sign addsig --field AUR-SIGN pemder --key cakey.pem --cert ca.pem --no-pass input-s.pdf output.pdf
pyhanko sign addsig --field AUR-SIGN pemder --key key2.pem --cert cert2.pem --no-pass input-s.pdf output.pdf
pyhanko sign addsig --field RIDER-SIGN pemder --key privkey.pem --cert cert.pem --no-pass output.pdf output.pdf
pyhanko sign addsig --field -1/70,320,206,456/AUR-SIGN --field -1/242,343,317,419/RIDER-SIGN pemder --key cakey.pem --cert ca.pem --key privkey.pem --cert cert.pem --no-pass input.pdf output.pdf
# qpdf
qpdf form.pdf --json > x.json # .acroform.fields
qpdf form.pdf --update-from-json=x.json x.pdf
- 公章尺寸: 125 × 125
- 签名尺寸: 75 × 75
- 获取用户手写签名保存为{sn}.png
- 读取默认 pyhanko.yml 并将用户手写签名图片路径导入并保存为{sn}.yml
- 使用 pyhanko 指定配置分别签名