【发布时间】:2015-06-20 04:26:39
【问题描述】:
我正在尝试使用 Python 对 PDF 文档进行签名,并发现了一个名为 MyPDFSigner 的东西。
文档很好,但是我发现文档有点混乱。
我遇到的唯一问题是如何安装 mypdfsigner 模块来运行代码以签署文档。
文档本身提供了一个代码示例,但是在未安装该模块时,我将无法运行它:
inputPath = "/tmp/input.pdf"
outputPath = "/tmp/output.pdf"
location = "Chicago, Illinois"
reason = "Demo"
contactInfo = "+1 555-555-5555"
certify = True
visible = True
title = "Signing with MyPDFSigner"
author = "KryptoKoder"
subject = "Python Extension"
keywords = "PKCS#12, PDF, MyPDFSigner"
confFile = "" # defaults to /usr/local/mypdfsigner/mypdfsigner.conf if empty
timestamp = True
print mypdfsigner.sign(inputPath, outputPath, location, reason, contactInfo, certify, visible, title, author, subject, keywords, confFile, timestamp)
有没有人尝试过这个工具并对我有什么建议?或者,如果您知道任何其他签署 PDF 文件的 Python 库,请告诉我。
谢谢。
【问题讨论】:
标签: python pdf digital-signature