Lindong-K/doc-watermark

Lindong-K★ 0PythonLast synced: 2026-08-15

Open on GitHub

README excerpt

Document Watermark · 文档水印 A professional, reading-friendly watermark for PDF / HTML / DOCX / TXT / Markdown, with built-in verification that proves the watermark never touches the reading area. Design principle (industry standard, see 中文说明): the watermark must never enter the content area. Margin-first placement is preferred; full-page tiled patterns are the most intrusive option and are forbidden. ✨ Features Format Method PDF reportlab + pypdf overlay drawn at known page coordinates inside the page margins (left vertical text rotated 90° as a single run + bottom-right corner mark, 32% opacity by default). No CSS print positioning. DOCX Word-native VML watermark in the header layer (z-index below body text), light fill — no reliance on Word's unreliable transparency. HTML CSS screen-only watermark (content layer above it, z-index:-1 ), hidden on @media print . TXT / MD Header/footer signature lines. - Verification (PDF): renders clean vs. watermarked pages at 1.5× , pixel-diffs them, and asserts every differing pixel lies in the page margins (content-area diff must be 0 ). Falls back to content-stream text detection when an overlay is too faint to diff (≤ 6% opacity). - Windows rob…

View full README on GitHub →
Agentsai-agentscordisdeepseekdeepseek-aideepseek-harnessdocument-watermarkdshdsh-plugin

Category