PDF去水印超能力

SKILL效率
效率 未标注权限 许可证不明确
安装这个技能

PDF 去水印:三种策略自动识别并清除水印。当用户提到 去水印、PDF水印、删除水印、批量去水印、无水印PDF、去掉文字水印 时触发。Artifact 无损剥离(正文零改动)、文本红删(按字符串定位并涂黑)、图像颜色检测+修复(适用于扫描件/水印已烤进像素的情况)。支持单文件与整文件夹批量,输出到新文件、不覆盖原件。

一句话选型结论

按资料字段整理

PDF去水印超能力是效率类的 Agent Skill,安装方式未标注,权限级别未标注,许可证不明确,有可直接复制的安装命令。技能本质是给模型读的说明书,效果取决于模型与客户端;装完先用一个小任务验证,再放进正式流程。

分类效率 安装方式未标注 权限级别未标注权限 许可证许可证不明确
累计安装 未标注 本周 未标注
GitHub 星标 未标注 仓库 未标注
下载量 未标注 技能市场下载数
权限级别 未标注权限 安装前请确认风险范围
许可证 许可证不明确 未说明

安装

未标注
在支持 Skills 的客户端里执行,装完问一句「你有哪些技能」验证
skillhub install user_14c15266/pdf-watermark-removal-superpower
  1. 1
    确认客户端支持

    确认你的客户端支持 Skills(Claude、Codex、Cursor 等),并升级到较新的版本。

  2. 2
    拿到技能文件

    执行上面的命令安装;也可以把仓库里的 SKILL.md 手动放进客户端的 skills 目录。

  3. 3
    刷新技能列表

    重新打开客户端,或刷新技能列表,让新放进来的技能被加载。

  4. 4
    验证是否生效

    问一句「你有哪些技能」,确认列表里出现它,再拿一个小任务试跑。

技能档案

效率
字段来自技能仓库与公开索引,中文说明由本站标注
作者 / 维护方user_14c15266仓库 未标注 · 版本 未标注
宿主客户端未标注技能可被这些客户端加载
安装方式未标注安装包 community
权限级别未标注权限安装前请确认风险范围
许可证未说明许可证不明确,商用前请自行确认条款
仓库可用性available技能仓库当前是否可访问
最近核验2026-11-06上游最后核验时间 · 数据更新 2026-11-06
正文体量13.2 KBSKILL.md 原文大小,越大说明说明书写得越细

典型使用场景

3 类
按分类整理的常见用法,具体以 SKILL.md 为准
整理待办与日程

把零散任务收进清单,排出优先级。

批量处理重复任务

把固定动作做成模板,重复执行。

把流程写成清单

把口头流程整理成可复用的步骤。

选择建议

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

值得选的地方

  • 有可直接复制的安装命令,不用自己翻文档找入口。

先想清楚的地方

  • 没有标注权限级别,实际能做什么要装好后确认。
  • 许可证不明确,商用或二次分发前先到仓库确认条款。
  • 没有做站内核验,内容以作者仓库为准。
  • 技能只是说明书,实际效果取决于模型与客户端,装完先用小任务试一遍。

更适合

  • 需要在效率场景里给模型补一套做法的人。
  • 愿意先读一遍 SKILL.md、确认它会让模型做什么的人。

不太适合

  • 对许可证要求很严、必须明确可商用的人。
  • 只想装完就自动变强、不打算看说明书的人。

同类对比

6 个同类
同分类里挑最接近的几条,字段以各自详情页为准
技能权限级别安装方式累计安装宿主客户端安装命令
PDF去水印超能力当前 未标注权限 未标注 未标注 未标注 有
Nano PDF 文档 联网访问 ClawHub 市场 424.9 万 OpenClaw 有
自动更新程序 浏览器控制 ClawHub 市场 296.4 万 OpenClaw 有
Gemini 助手 联网访问 ClawHub 市场 254.7 万 OpenClaw 有
word DOCX 文档 联网访问 ClawHub 市场 239.6 万 OpenClaw 有
Excel XLSX 前端 联网访问 ClawHub 市场 227.0 万 OpenClaw 有

SKILL.md 全文

13.2 KB
模型实际读到的说明书原文,来自技能仓库

PDF去水印超能力 (v1.0.3)

Overview

This skill removes watermarks from PDF files using three strategies, tried in order:

  1. Artifact-based removal (lossless, surgical): Strips /Artifact <</Subtype/Watermark...>> BDC ... EMC blocks from page content streams. Only content streams that actually contain watermark blocks are modified; sibling streams on the same page stay intact. Does not touch page text at all.
  2. Text-based removal (redaction): Searches for the watermark text string via PyMuPDF and applies redaction annotations. Auto-detection uses a high-confidence rule (large font, light colour, or many occurrences) so body text is never redacted by accident.
  3. Image-based removal (color detection + inpainting): For scanned/rasterized PDFs where the watermark is baked into page images. Detects watermark-colored pixels and inpaints them using OpenCV.

No-rework guarantee (v1.0.2): every strategy is saved to a temp file and verified before it becomes the final output. If a strategy fails verification (watermark remains, body text changed, or the file is corrupt), the next strategy runs automatically. The output file is never overwritten by a failed attempt. If all strategies fail, no output file is produced and the error is reported.

The skill auto-detects the watermark type and picks the best strategy. The user can override with --text or --force-image.

When to Use

Trigger this skill for requests such as:

  • "Remove the watermark from this PDF."
  • "Delete the diagonal text watermark from these PDFs."
  • "Make a clean copy of the watermarked PDF."
  • Batch processing: "Remove watermarks from all PDFs in this folder."
  • "帮我去掉这个PDF的水印。" / "批量去除PDF上的水印。"
  • "Create a reusable script/skill to remove 'XXX' watermark from PDFs."

Dependencies

  • Python 3.x
  • pymupdf (PyMuPDF) — pip install pymupdf
  • numpy, opencv-python-headless — only needed for image-based removal (Strategy 3)

Workflow

  1. Auto-detect watermark type. Check the first few pages for:
    - /Artifact ... /Subtype /Watermark ... BDC ... EMC blocks → Strategy 1
    - Searchable watermark text → Strategy 2 (high-confidence rule: large font ≥18pt, light colour, or ≥5 occurrences; body text is never redacted by accident)
    - Single full-page image XObject (scanned PDF) → Strategy 3
  2. Apply the strategy to all pages, save to a temp file, and verify before promoting:
    - No artifact blocks remain; watermark text is gone; body text is unchanged (artifact strategy requires byte-identical text); image streams still decode.
  3. Promote or fallback: on verification failure, the next strategy runs automatically; on success, the temp file is promoted to the final output. The original file is never touched, and a failed attempt never overwrites a good output.
  4. Save the promoted file with garbage=4, deflate=True, clean=True.

Implementation Details

Strategy 1: Artifact-based removal (preferred)

Watermark blocks in the content stream:

/Artifact <</Subtype/Watermark/Type/Pagination>>BDC
q
/KSPE186 gs
0.707107 0.707107 -0.707107 0.707107 X Y cm
/KSPX185 Do
Q
EMC

Regex: /Artifact\s*<<[^>]*?/Subtype\s*/Watermark[^>]*?>>\s*BDC.*?EMC (DOTALL). Remove all matches from each page's content stream via doc.update_stream(xref, cleaned_bytes).

v1.0.2 fix: only content streams that actually contain watermark blocks are modified; sibling content streams on the same page are left intact (previous versions cleared xrefs[1:], which could delete unrelated content).

Strategy 2: Text-based removal

Auto-detection scans spans in the first pages and matches against a watermark word list (English: DRAFT, CONFIDENTIAL, SAMPLE, WATERMARK, COPY; Chinese: 样章, 内部资料, 仅供试读, 仅供试学, 试读版, 版权所有, 翻版必究, 严禁外传, 内部使用). A word is only treated as a watermark when it has at least one of:

  • font size ≥ 18pt (large watermark text)
  • very light colour (near-white/grey, sum of RGB > 600)
  • ≥ 5 occurrences on sampled pages

This prevents redacting body text that merely contains a common word like "COPY" twice. ASCII words match with word boundaries; Chinese words match as substrings.

for page in doc:
    for rect in page.search_for(watermark_text):
        page.add_redact_annot(rect)
    page.apply_redactions(images=pymupdf.PDF_REDACT_IMAGE_NONE)

Strategy 3: Image-based removal (scanned PDFs)

For PDFs where each page is a single rasterized image (common in "标清" / standard-definition scans), the watermark is baked into the pixels. Removal steps:

  1. Extract the image XObject from each page via doc.extract_image(xref).
  2. Detect watermark pixels by color distance to the watermark color. If --wm-color is not given, auto-detect the dominant saturated non-background colour (S > 60, V 40–250) from the image.
  3. Dilate the mask with a 7×7 elliptical kernel (1 iteration) to cover stroke edges.
  4. Inpaint using cv2.inpaint(img, mask, inpaintRadius=3, flags=cv2.INPAINT_TELEA).
  5. Update the XObject stream with an explicit /Filter /FlateDecode, /ColorSpace /DeviceRGB, /BitsPerComponent 8 dictionary (doc.xref_set_key), so the rewritten stream always decodes correctly.

v1.0.2 fix: the XObject stream is now rewritten with explicit Filter / ColorSpace / BitsPerComponent / Width / Height keys. The previous version wrote raw RGB bytes without these keys, which could corrupt the PDF in some viewers.

Key parameters:
- --wm-color R,G,B: specify a custom watermark color; otherwise auto-detected per page
- --force-image: skip artifact/text detection and go straight to image inpainting
- Color distance threshold: 35 (tight, to minimize false positives)
- Inpaint radius: 3 pixels
- Minimum pixels to trigger a page: 50

Scripts

  • scripts/remove_pdf_watermark.py — standalone CLI script implementing all three strategies.
  • Single file: python remove_pdf_watermark.py input.pdf
  • Custom output: python remove_pdf_watermark.py input.pdf -o clean.pdf
  • Batch: python remove_pdf_watermark.py folder/*.pdf -o output_folder/
  • Text fallback: python remove_pdf_watermark.py input.pdf --text "DRAFT"
  • Image mode with custom color: python remove_pdf_watermark.py input.pdf --force-image --wm-color 133,94,119

Run with --help for full usage.

Safety Notes

  • Always write output to a new file; never overwrite the original PDF by default.
  • Image-based removal (Strategy 3) re-encodes page images. File size may increase slightly. Quality is preserved with FlateDecode (lossless) compression.
  • After removal, verify that non-watermark content is preserved. For artifact removal, compare extracted text before and after. For image removal, visually inspect sample pages.
  • The default watermark color (RGB 133,94,119) is a purple/magenta commonly used by online course providers. For any other watermark, use --wm-color to specify the exact color, or analyze the PDF first to detect the watermark color.

Parameter Reference

Parameter Purpose Example
-o PATH Output file (single) or output folder (batch) -o clean.pdf
--text "STR" Force Strategy 2 with an explicit watermark string --text "DRAFT"
--force-image Skip detection, go straight to Strategy 3 --force-image
--wm-color R,G,B Custom watermark color for Strategy 3 --wm-color 133,94,119

Run python remove_pdf_watermark.py --help for the full list.

Troubleshooting

Symptom Cause Fix
Watermark still there after Strategy 1 Watermark is a plain text object, not a tagged artifact Retry with --text "<watermark text>"
Nothing removed on a scanned PDF Watermark baked into page pixels Use --force-image
Image mode removes too little Default color does not match Sample the exact color and pass --wm-color
Image mode removes too much Color threshold too loose Use a more precise --wm-color instead of a near-black/near-white value
Output file is larger Strategy 3 re-encodes page images Expected; compression is lossless (FlateDecode)
Script reports it cannot open the file PDF is encrypted or permission-restricted Decrypt it first; this skill does not bypass PDF permissions
Text confirmed removed but a faint ghost remains Anti-aliased edge pixels Increase inpaint coverage, or accept it — it is usually invisible in print

Choosing a Strategy Deliberately

The auto-detection is right most of the time, but you can be faster and safer by choosing directly:

  • The PDF came from Word / LaTeX / a report generator → the watermark is almost certainly a tagged artifact. Strategy 1. Text stays byte-identical.
  • You can select the watermark text with the cursor → Strategy 2 with --text.
  • The page is one big image (you cannot select anything) → Strategy 3. This is the only one that re-encodes images, so verify a few pages afterwards.

Rule of thumb: always try the least destructive strategy first. Strategy 1 never touches page content; Strategy 3 rewrites pixels and is the only one that can slightly soften an image.

中文使用速查

# 单文件,输出到新文件(最常用)
python scripts/remove_pdf_watermark.py 输入.pdf -o 干净.pdf

# 整文件夹批量,输出到指定目录
python scripts/remove_pdf_watermark.py 文件夹/*.pdf -o 输出目录/

# 扫描件(水印烤进像素),指定水印颜色
python scripts/remove_pdf_watermark.py 输入.pdf --force-image --wm-color 133,94,119

# 已知水印文字,直接按文字清除
python scripts/remove_pdf_watermark.py 输入.pdf --text "样章"

依赖安装:pip install pymupdf;扫描件模式另需 pip install numpy opencv-python-headless。

请仅处理您拥有合法权利或已获授权的文档。

Changelog

v1.0.3 (2026-11-01)

  • 头像更新:替换上架物料头像(剪贴板图片,512×512 PNG)。
  • 脚本流程与 v1.0.2 一致(级联验证、防返工、防误删、防误伤正文、图像流修复、跨盘安全)。

v1.0.2 (2026-11-01)

  • No-rework pipeline: every strategy saves to a temp file and is verified (watermark gone, body text unchanged, images decode) before being promoted to the final output; failed strategies cascade to the next one, and a failed attempt never overwrites a good output.
  • Artifact removal fix: only content streams that actually contain watermark blocks are modified; sibling streams on the same page are no longer cleared.
  • Text auto-detection hardened: watermark words must have a high-confidence signal (font ≥18pt, light colour, or ≥5 occurrences); body text containing common words (COPY, SAMPLE...) is never redacted. ASCII words match with word boundaries.
  • Image stream fix: rewritten XObjects now carry explicit /Filter /FlateDecode, /ColorSpace /DeviceRGB, /BitsPerComponent 8, /Width, /Height keys so the PDF stays valid.
  • Cross-drive safe: temp files are created in the output directory; promotion uses shutil.move as fallback.
  • Chinese watermark word list added (样章 / 内部资料 / 仅供试读 …).

v1.0.1 (2026-10-28)

  • Renamed slug to pdf-watermark-removal-superpower (English translation of PDF去水印超能力); published to SkillHub.
  • Added author field 我帮你做.

常见问题

5 问
答案由本站依据条目字段整理
PDF去水印超能力怎么安装?

在支持 Skills 的客户端里执行:skillhub install user_14c15266/pdf-watermark-removal-superpower。安装方式为未标注。装完刷新技能列表或重开客户端。

PDF去水印超能力支持哪些客户端?

资料没有标注宿主客户端,但只要客户端支持 Skills(Claude、Codex、Cursor 等),一般都能加载。

PDF去水印超能力权限高吗,安全吗?

权限级别为未标注权限。安装前先看它会读取或写入哪些内容。

PDF去水印超能力收费吗?

本站不代收费用,也没有标注具体价格。是否收费取决于技能本身和所用的模型或客户端,正式使用前按作者说明确认。

PDF去水印超能力用什么许可证?

许可证标注为 未说明(许可证不明确)。商用或二次分发前请到仓库确认条款原文。

热门专题

按场景挑技能
全部专题 →

技能内容以作者仓库为准;分类、权限级别与许可证状态的中文说明为中文整理,最近核验 2026-11-06。