pdf-electronic-signature

DSH PLUGINUI 与外观

仓库 juntaoxiao/pdf-electronic-signature

UI 与外观 未标注验证等级 安全审查:未标注 可信度:未标注 可安装插件

为 DeepSeek Harness 提供 PDF 电子签名能力:生成手写风格签名图、在 PDF 上盖章,并用自有证书完成真正的 PKCS#7 数字签名。

一句话选型结论

按资料字段整理

pdf-electronic-signature 是UI 与外观类的 DSH 可安装插件,未做沙盒验证,暂无安全审查结论,列出 5 项功能,没有现成安装命令,需要按仓库 README 接入。验证通过不等于安全:插件会读写文件、执行命令或联网,装前先到仓库确认它做了什么;涉及密钥或系统权限的,建议先在隔离环境试装。

分类UI 与外观 收录类型可安装插件 验证等级未标注验证等级 安全审查未标注
验证等级 UNKNOWN 未标注验证等级
GitHub 星标 0 复刻 0 · 未关闭 issue 0
最近更新 2026-09-20 创建于 2026-09-20
README 13.9 KB 正文体量,越大说明说明书写得越细

安装

可安装插件
在 DSH 里执行,装完用 dsh plugin list 确认已挂上;标了 L4 / L5 的命令已在沙盒里真实跑通
  1. 1
    确认版本与运行环境

    仓库没有标注兼容版本与 Node.js 要求,先确认你的 DSH 版本能装,再继续。

  2. 2
    执行安装命令

    在 DSH 里执行上面的命令;多包仓库要注意区分具体子包名,别装错包。

  3. 3
    确认已挂载

    用 dsh plugin list 查看列表里是否出现这个插件,出现即挂载成功。

  4. 4
    试跑并检查权限

    加载后跑一个最小用例,确认它能正常工作;同时看它申请了哪些文件、命令或网络权限。

兼容 DSH 版本未标注版本不匹配时安装会报错
Node.js 要求未标注来自仓库 package.json 的 engines 字段
前置依赖无需要同时安装的同级依赖
npm 包名未发布到 npm可用 npm view 查看包信息

能做什么

5 项功能
字段来自项目仓库与公开索引,中文说明由本站标注

pdf-electronic-signature:DeepSeek Harness 的 PDF 电子签名工具集

  • 生成手写风格签名图
  • 在 PDF 指定页盖章
  • PKCS#7 数字签名
  • 自签证书生成
  • 检查 PDF 签名结构

上游标签

cordis-plugindeepseek-harnessdigital-signaturedshdsh-plugine-signaturepdfpkcs7

验证等级与安全审查

未标注验证等级
自动化流程结论,不是人工审核
验证等级未标注验证等级上游未给出验证结论,安装前请自行确认
安全审查未标注静态分析结论,未标注不代表已通过审查
仓库健康度未标注按仓库活跃度与最近更新时间给出
可信度未标注综合仓库活跃度与验证结果

选择建议

装之前先看这几条
按条目字段给出的判断,不替你决定用不用

值得选的地方

  • 列出了 5 项功能,能直接看出它解决什么问题。

先想清楚的地方

  • 安全审查还没结论,装之前先看仓库改了什么、要什么权限。
  • 没有现成安装命令,要按仓库 README 手动接入。
  • 验证通过不等于安全:插件会读写文件、执行命令或联网,装前先到仓库确认它做了什么。

更适合

  • 需要在UI 与外观场景里给 DSH 补能力的人。
  • 能接受在本地装依赖、愿意自己确认权限的人。

不太适合

  • 只使用 DSH 官方内置能力、不接受第三方插件的人。

同类对比

6 个同类
同分类里挑最接近的几条,字段以各自详情页为准
插件验证等级安全审查星标兼容版本安装命令
pdf-electronic-signature当前 未做沙盒验证 未标注 0 未标注 无
nuwa-skill 未做沙盒验证 未标注 3.8 万 未标注 有
awesome-dsh-plugin L4 · 沙盒安装通过 低风险 1.8 万 0.1.1-rc.2 有
deepseek-balance-whale-widget L4 · 沙盒安装通过 低风险 4,492 0.1.7-rc.2 等 2 个 有
dsh-better-sidebar L4 · 沙盒安装通过 低风险 4,112 0.1.7-rc.2 等 10 个 有
dsh-deep-whale L4 · 沙盒安装通过 低风险 2,470 未标注 有

仓库档案

UI 与外观
字段来自项目仓库与公开索引,中文说明由本站标注
作者 / 维护方juntaoxiao仓库 pdf-electronic-signature · 默认分支 main
分类UI 与外观fun-dressup
收录类型可安装插件声明了 dsh.bundle、可用 dsh plugin add 安装的条目
开发语言JavaScript仓库主语言
许可证MIT商用或二次分发前请确认条款原文
星标 / 复刻 / issue0 / 0 / 0收录时的数值,非实时
创建 / 更新2026-09-20 · 2026-09-20最后推送 2026-09-20
本站收录2026-09-21首次进入本站目录的时间

README 全文

13.9 KB
作者原文,中文版优先;只做安全转义,不改内容

dsh-pdf-sign

PDF electronic signing for DeepSeek Harness (DSH) — generate a handwritten-style signature image, stamp it on a PDF, and apply a real PKCS#7 digital signature.

DeepSeek Harness 的 PDF 电子签名插件 —— 生成手写风格签名图、在 PDF 上盖章、并用你自己的证书做真正的 PKCS#7 数字签名。

English · 中文


English

What it does

Three capabilities, kept deliberately separate because they mean very different things:

Tool What it produces Guarantee
pdf_signature_image A handwritten-style signature image (PNG/SVG) from a name none — it is artwork
pdf_sign_stamp Ink placed on a PDF page (signature image and/or a typed block) visual only
pdf_sign_digital A PKCS#7/CMS detached signature over the whole file cryptographic (/ByteRange + CMS)
pdf_sign_cert_generate A self-signed certificate + .p12 bundle for testing none — self-signed
pdf_sign_inspect Structural report of what signatures a PDF contains inspection only

The distinction matters: a stamped signature looks signed but proves nothing. A digital signature proves the document was not altered after signing and identifies who holds the key — but only a certificate from a real CA makes a reader display it as trusted.

Install

dsh plugin --profile web add dsh-pdf-sign

Restart DSH, then the pdf_sign_* tools are available to the agent.

Quick start

# 1. Make a signature image
pdf_signature_image(text="Juntao Xiao", output_path="/abs/path/sig.png")

# 2. Stamp it on the last page
pdf_sign_stamp(pdf_path="/abs/path/contract.pdf",
image_path="/abs/path/sig.png",
text="Juntao Xiao", date_text="2026-09-20",
anchor="bottom-right", width=200)

# 3. Add a real digital signature
pdf_sign_cert_generate(common_name="Juntao Xiao", passphrase="secret",
output_dir="/abs/path/certs")
pdf_sign_digital(pdf_path="/abs/path/contract.pdf",
output_path="/abs/path/contract-signed.pdf",
p12_path="/abs/path/certs/signing-cert.p12",
passphrase="secret", reason="Approval")

Tool reference

pdf_signature_image

Parameter Type Notes
text string, required The signature text, usually the signer's name
output_path string, required Absolute path; .png (default) or .svg
font_size number Glyph size in px (default 120)
width number Output PNG width in px
color string blue-black|black|blue|red, #rrggbb, or r,g,b with 0–1 components
rotation number Whole-signature tilt in degrees (default -2.5)
jitter number Handwriting irregularity, 0 = perfectly straight (default 1)
underline boolean Pen flourish under the signature (default true)
letter_spacing number Extra px between glyphs
font_file string Explicit font file; defaults to the best handwriting font found
format png|svg Force the output format

Each glyph is emitted as its own rotated, vertically jittered node using a text-seeded pattern — so the same name always produces the identical signature, which matters when a document is re-signed.

Best available fonts are auto-detected: 楷体/标楷体/华文行楷 on Windows, Songti/Kai on macOS, Noto Serif CJK/AR PL UKai on Linux.

pdf_sign_stamp

Parameter Type Notes
pdf_path string, required Source PDF
output_path string Default -signed.pdf beside the source
image_path string Signature image (PNG/JPEG)
text / date_text / reason string Typed block lines
page number|"last"|"all" Default last
anchor enum top/middle/bottom × left/center/right; default bottom-right
x, y number Explicit PDF-point origin, overriding anchor
width number Image width in points (default 180)
opacity number 0–1 (default 1)
rotation number Image rotation in degrees
margin number Edge margin in points (default 48)
font_size number Text block size (default 10)
color string #rrggbb or r,g,b
drop_background string Key a flat background out to transparency: none (default), white, auto, or #rrggbb
drop_tolerance number Per-channel tolerance for "this pixel is background" (default 28)
trim_image boolean Crop transparent margins so the ink defines the box (default true)

Non-Latin text (Chinese, Japanese, Korean, …) is drawn with a subset-embedded system TrueType font, because pdf-lib's standard fonts are WinAnsi-only and cannot encode those characters at all.

Background transparency — read this before stacking two images

Signature and seal images are normally exported as opaque images on a solid background. An opaque background is a filled rectangle: it hides whatever it is drawn over. So a seal placed on top of a signature erases the signature, and a stamp over body text whitens that text. If you feed such an image without drop_background, the tool says so in its note rather than failing silently.

pdf_sign_stamp(pdf_path="contract.pdf", image_path="signature.png",
drop_background="white")          # opaque white export
pdf_sign_stamp(pdf_path="contract.pdf", image_path="scan.jpg",
drop_background="auto")           # samples the border
  • white — for the usual white-background export.
  • auto — samples the image border and keys out the dominant border colour. Use when the background is off-white or you don't know it. (It takes the most frequent border colour, not the mean, so ink that runs off the edge does not drag the estimate toward grey.)
  • #rrggbb — an explicit colour.

Colour fidelity is preserved: the toolkit un-composites each pixel (I = (C − B·(1−a)) / a) instead of just fading it, so the result over the page reproduces the original pixel rather than looking washed out. Only light backgrounds can be keyed this way (darkest channel must be ≥ 32); a dark background is rejected with an explanatory error. PNG and JPEG sources both work.

trim_image then crops the transparent margins, so the placement box follows the actual ink instead of the source canvas — important because a padded canvas otherwise makes the stamp look far smaller and more offset than intended.

pdf_sign_digital

Parameter Type Notes
pdf_path string, required Source PDF
p12_path string, required Your PKCS#12 (.p12/.pfx) with the private key
passphrase string PKCS#12 passphrase (empty when unprotected)
name / reason / location / contact_info string Recorded in the signature
signing_time string ISO timestamp; defaults to now
page number|"last" Page the widget sits on
widget_rect number[4] [x1,y1,x2,y2] widget rectangle in points
sub_filter enum adbe.pkcs7.detached (default) or ETSI.CAdES.detached
signature_length number Reserved placeholder bytes; raise it if signing reports a length error

pdf_sign_cert_generate

Creates a self-signed certificate and .p12, or bundles an existing key + certificate pair (pass both key_path and cert_path). Requires OpenSSL; the bundled OpenSSL in Git for Windows is found automatically.

pdf_sign_inspect

Reports signature form fields, how many byte ranges are signed, the CMS sub-filter, and placeholder metadata. Structural inspection only — it does not verify cryptographic validity, which requires the signer's certificate chain.

Security stance

  • Ships no keys, no CA, no trust anchor. Nothing here can forge a signature that a reader would trust.
  • Self-signed certificates produce signatures that validate as intact but display as untrusted. That is the correct and expected outcome; obtaining a CA-issued certificate is your job.
  • Your private key and passphrase stay on your machine. The plugin does not transmit anything anywhere.
  • Signing writes the placeholder without object streams, which is required for the incremental-update signing scheme — not a stylistic choice.

Requirements

  • Node.js ≥ 20
  • OpenSSL, only for pdf_sign_cert_generate (auto-detected, including Git for Windows)
  • Optional: the native @resvg/resvg-js binding for PNG rasterization. It ships as a dependency; if it cannot load on your platform, pdf_signature_image writes SVG instead and says so explicitly.

Known limitations

  • pdf_sign_inspect does not perform cryptographic verification, and does not consult a trust store.
  • Encrypted PDFs are loaded with ignoreEncryption, so signing an encrypted document is not supported.
  • Subset-embedded CJK fonts increase file size modestly (subset only, not the whole font).
  • ETSI.CAdES.detached is offered, but only adbe.pkcs7.detached has been exercised end to end.

License

MIT


中文

它做什么

五种能力,刻意分开——因为它们代表的东西完全不同:

工具 产出 保证
pdf_signature_image 手写风格签名图(PNG/SVG) 无,它只是图像
pdf_sign_stamp 把签名盖到 PDF 页面上(签名图 和/或 文字块) 仅视觉
pdf_sign_digital 覆盖整个文件的 PKCS#7/CMS 分离式签名 密码学保证(/ByteRange + CMS)
pdf_sign_cert_generate 自签名证书 + .p12(测试用) 无,自签名
pdf_sign_inspect PDF 中签名结构的检查报告 仅结构检查

这个区分很关键:盖章看起来像签了名,但什么都证明不了;数字签名能证明文件在签名后未被改动、并标识持钥者身份——但只有来自真实 CA 的证书,PDF 阅读器才会显示为「受信任」。

安装

dsh plugin --profile web add dsh-pdf-sign

重启 DSH 后,agent 即可使用 pdf_sign_* 系列工具。

快速开始

# 1. 生成签名图
pdf_signature_image(text="肖俊涛", output_path="D:/sign/sig.png")

# 2. 盖到最后一页
pdf_sign_stamp(pdf_path="D:/contract.pdf",
image_path="D:/sign/sig.png",
text="肖俊涛", date_text="2026-09-20",
anchor="bottom-right", width=200)

# 3. 加真正的数字签名
pdf_sign_cert_generate(common_name="肖俊涛", passphrase="你的口令",
output_dir="D:/sign/certs")
pdf_sign_digital(pdf_path="D:/contract.pdf",
output_path="D:/contract-signed.pdf",
p12_path="D:/sign/certs/signing-cert.p12",
passphrase="你的口令", reason="合同审批")

五个实现要点

  1. 确定性签名:每个字以独立的旋转+抖动节点渲染,抖动由文本内容做种子——同一个名字永远生成一模一样的签名,重复签署不会出现两种笔迹。
  2. 中文文字盖章需要嵌入字体:pdf-lib 的标准字体是 WinAnsi 编码,无法编码任何中文。插件会自动寻找系统中可嵌入的 TrueType 中文字体(楷体/黑体/仿宋/等线)并做子集嵌入。
  3. 数字签名的占位符必须禁用对象流保存(useObjectStreams: false),这是增量更新签名方案的硬性要求,不是代码风格选择。
  4. 白底必须转透明,否则叠放会互相遮盖(drop_background)。签名与印章图通常是不透明的实底图,而不透明背景就是一个实心矩形——印章盖在签名上会把签名整个擦掉,盖在正文上会把正文涂白。所以:
pdf_sign_stamp(pdf_path="合同.pdf", image_path="签名.png",
drop_background="white")     # 常见白底导出图
pdf_sign_stamp(pdf_path="合同.pdf", image_path="扫描件.jpg",
drop_background="auto")      # 自动采样边框色
  • white:常规白底导出图;auto:采样边框并去掉占主导的边框色;也可直接给 #rrggbb。
  • 保留颜色保真:不是简单地把白变透明(那会让墨迹发灰),而是对每个像素做反合成(I = (C − B·(1−a)) / a),使结果叠到页面上后与原图像素完全一致。
  • 取的是边框众数而非均值——墨迹触到画布边缘时,均值会被拉灰(实测会把 250,248,245 误算成 238,236,233),众数不受影响。
  • 仅支持浅色背景(最暗通道 ≥ 32);深色背景会明确报错,不静默出错。PNG 与 JPEG 均可。
  • 未指定 drop_background 而图片又是「全不透明且 ≥90% 近白」时,工具会在 note 里主动提示该开这个参数,而不是让你事后才发现白块盖住了东西。
    5. trim_image(默认开)裁掉透明留白:让放置框跟着真实墨迹走,而不是源画布。否则带大量留白的画布会让印章看起来远小于预期、位置也偏。

安全立场

  • 不内置任何密钥、CA 或信任锚。这里没有任何东西能伪造出阅读器会信任的签名。
  • 自签名证书产生的签名「完整性有效」但显示为「不受信任」——这是正确且预期的结果;取得 CA 签发的证书是你自己的事。
  • 你的私钥与口令只留在本机,插件不向任何地方传输数据。

已知限制

  • pdf_sign_inspect 不做密码学验证,也不查询信任库。
  • 加密 PDF 以 ignoreEncryption 方式加载,因此不支持对加密文档签名。
  • ETSI.CAdES.detached 虽已提供,但只有 adbe.pkcs7.detached 经过端到端实测。
  • 文本图章使用子集嵌入字体,会让 PDF 略微变大(只嵌入用到的字形,不是整个字体)。

许可

MIT


本项目是 DeepSeek Harness 的社区插件,并非 DeepSeek 官方产品。
本插件与 Adobe、OpenSSL 及任何证书颁发机构均无从属关系。

常见问题

7 问
答案由本站依据条目字段整理,不引用上游原文
pdf-electronic-signature 怎么安装?

本站没有抓到该条目的安装命令,请到仓库主页确认安装方式;这类条目多数是生态应用或尚未发布安装包的项目。

pdf-electronic-signature 的验证等级是什么意思?

未标注验证等级。上游未给出验证结论,安装前请自行确认

pdf-electronic-signature 安全吗?

未标注。

pdf-electronic-signature 装之前要先确认什么?

先看它会读写哪些文件、执行哪些命令、连接哪些网络地址;验证等级只说明装得上、跑得起来,不等于安全。涉及密钥或系统权限的,建议先在隔离环境试装。

pdf-electronic-signature 用的是什么许可证?

上游标注为 MIT。商用或二次分发前请到仓库确认许可证原文。

pdf-electronic-signature 有哪些功能?

生成手写风格签名图、在 PDF 指定页盖章、PKCS#7 数字签名、自签证书生成、检查 PDF 签名结构。

这条记录的数据可靠吗?

本站按仓库名去重后合并整理,字段以作者仓库与 npm 元数据为准;安装命令、仓库地址与 README 保持原文,带 L4 / L5 标记的安装命令已在隔离沙盒里真实跑通。

UI 与外观
按星标排序,可作替代方案

nuwa-skill

nuwa-skill

女娲 DSH plugin 只需输入一个名字,就自动调研、提炼并验证任何人的心智模型、决策启发式与表达 DNA,生成可直接调用的思维视角 S

未标注验证等级 3.8 万 星

awesome-dsh-plugin

awesome-dsh-plugin

A curated list of plugins for DeepSeek Harness (dsh) · DeepSeek Harnes

L4 · 沙盒安装通过 1.8 万 星

deepseek-balance-whale-widget

DeepSeek-Balance-Whale-Widget

DSH 界面右下角的常驻小鲸鱼余额挂件,实时显示 DeepSeek 账户余额、今日已用与每轮对话消耗,支持拖拽吸附、Q 弹动画与音效,开箱即

L4 · 沙盒安装通过 4,492 星

dsh-better-sidebar

DSH-better-sidebar

面向 DeepSeek Harness 的服务化侧边栏工作台插件,把文件编辑、终端、Git 变更、子代理任务与侧边对话整合进右侧栏与底部面板

L4 · 沙盒安装通过 4,112 星

dsh-deep-whale

dsh-deep-whale

DSH Web 鲸鱼娘皮肤系列(深海女仆工坊 maid-atelier)。

L4 · 沙盒安装通过 2,470 星

deepseek-design

deepseek-design

可视化设计工作室,支持网站、App 原型、海报、信息卡、报告和杂志的模板创建、元素编辑、选区级 AI 草稿衔接与导出。

L4 · 沙盒安装通过 1,438 星

插件的元信息来自作者仓库;分类、验证等级与安全结论的中文说明为中文整理,最近核验 —。