name: pdf-watermark-remover description: > Remove image-based watermarks from PDF files (e.g. "Made with Gamma", Canva, Notion watermarks). This skill should be used when the user wants to remove watermarks from a PDF, delete PDF watermarks, clean up PDF watermark text or images, or says "去水印", "remove watermark", "去掉水印", "去PDF水印", "delete watermark", "消除水印", "水印去除". Works by deleting drawing instructions from content streams and removing XObject references — no color overlay, no image replacement, clean removal with no visual artifacts.
Remove image-based watermarks from PDF files by surgically deleting the drawing instructions from content streams and removing XObject resource references. This produces clean results with no visible artifacts (no white/black rectangles, no color mismatches).
The removal process targets the root cause — the PDF content stream instructions that draw the watermark image — rather than covering or replacing the image:
q...cm.../Name Do...Q drawing instructionThis approach leaves zero visual artifacts because the watermark simply never gets drawn.
7w4.net收錄了海量優質技能外掛。
Before running the script, determine the watermark's characteristics:
gamma.app)Execute scripts/remove_watermark.py:
python scripts/remove_watermark.py <input.pdf> <output.pdf> [options]
Common options:
| Option | Default | Description |
|---|---|---|
--x-threshold |
700 | X position threshold — images with x0 > this value are candidates |
--min-w / --max-w |
100 / 200 | Width range for watermark detection |
--min-h / --max-h |
20 / 50 | Height range for watermark detection |
--remove-links |
off | Also remove link annotations |
--link-domain |
all | Only remove links containing this domain |
Gamma watermark example:
python scripts/remove_watermark.py input.pdf output.pdf --remove-links --link-domain gamma.app
Custom position watermark (e.g. top-left):
python scripts/remove_watermark.py input.pdf output.pdf --x-threshold 0 --min-w 50 --max-w 300 --min-h 10 --max-h 80
Open the output PDF and check: - Watermark is completely gone (no visual remnants) - No color patches, rectangles, or artifacts in the watermark area - Page content is otherwise intact
| Problem | Cause | Solution |
|---|---|---|
| Watermark still visible | Position/size doesn't match detection thresholds | Adjust --x-threshold, --min-w/max-w, --min-h/max-h |
| - Watermark still visible after adjustment | Watermark may be text-based, not image-based | This skill only handles image watermarks; for text watermarks, use redaction or content stream editing |
| Other images accidentally removed | Detection thresholds too broad | Narrow the width/height/position ranges |
| Black/white rectangle appears | Old approach used image replacement instead of content stream deletion | This skill uses content stream deletion — this should not happen |
Why not overlay/replace? Three approaches that DON'T work well:
1. White rectangle overlay — Visible on non-white backgrounds, misses rounded corners
2. Image data replacement with 1x1 pixel — PDF renders the 1x1 pixel scaled up as a colored rectangle (black for transparent, white for white pixel)
3. delete_image API — Only clears image data, doesn't remove the XObject reference or content stream Do instruction; renders as blank/colored rectangle
The correct approach (used by this skill): Delete the Do instruction from the content stream
and the /Name xref R entry from the XObject dictionary. The watermark image data becomes an
orphaned object that gets garbage-collected on save.
pip install pymupdf)這是一個功能可靠的 PDF 水印移除工具,能有效清除圖片水印且不留痕跡。文件說明詳細清晰,命令列引數設計合理。主要侷限是隻能處理圖片水印,對文字類水印無能為力;使用時需要手動調整引數判斷水印位置和大小,對新手不太友好。整體適合有技術基礎的使用者使用。