我想用Python签署PDF文档,并找到一些名为MyPDFSigner的东西。用Python数字签名PDF文档
这是有据可查的,但我发现文件有点混淆。 我遇到的唯一问题是如何安装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)
有谁已经尝试过这个工具,有什么建议给我吗?或者,如果你知道任何其他Python库签署PDF文件,请告诉我。
谢谢。
你是对的,谢谢。我错过了,我的坏。但是,这样做后,运行test.py它会给我一个错误:Traceback(最近调用最后一次): 文件“C:\ Program Files文件(x86)\ MyPDFSigner \ tests \ test.py”,第3行 import mypdfsigner ImportError:DLL load failer:无法找到指定的模块。 你认为它与某些DLL有关吗? –
更新时参考了文档 –
非常感谢。有效。猜猜我现在必须更多地关注文档。 –