Code Monkey home page Code Monkey logo

pdf_signer's Introduction

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

我还整了中英双语。

pdf_signer's People

Contributors

micraow avatar

Watchers

 avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.