这里的软件包似乎提供了使用Ruby签名PDF的扩展.它不是免费的,但看起来它提供了原生的ruby界面.
以下是如何在ruby中使用(在安装之后):
require 'mypdfsigner'
include MyPDFSigner
inputPath = "/tmp/input.pdf"
outputPath = "/tmp/output.pdf"
location = "Chicago"
reason = "Demo"
contactInfo = "+1 555-555-5555"
certify = false # not supported yet
visible = true
title = "Signing with MyPDFSigner"
author = "KryptoKoder"
subject = "Ruby Extension"
keywords = "PKCS#12, MyPDFSigner, PDF"
confFile = "" # defaults to /usr/local/mypdfsigner/mypdfsigner.conf if empty
timestamp = true
puts mypdfsigner_sign(inputPath, outputPath, location, reason, contactInfo, certify, visible, title, author, subject, keywords, confFile, timestamp)
Run Code Online (Sandbox Code Playgroud)
还有一个命令行界面,因此您可以根据需要编写脚本,以及桌面应用程序.
| 归档时间: |
|
| 查看次数: |
945 次 |
| 最近记录: |