Skip to main content

MCP服务:PDF 添加图片水印,仅提供 add_pdf_watermark

Project description

PDF 添加图片水印 MCP 服务

仅提供一个工具:add_pdf_watermark,用于为 PDF 添加图片或由文字生成的水印。

运行

uv run pdf-mcp-server

或:

$env:PYTHONPATH="src"; python -c "import pdf_mcp.server; pdf_mcp.server.main()"

工具:add_pdf_watermark

  • input_path (str) 输入 PDF 文件路径
  • output_path (str) 输出 PDF 文件路径
  • watermark_text (str, 可选) 水印文字(将生成图片叠加)
  • watermark_image_path (str, 可选) 水印图片路径
  • opacity (float) 不透明度 (0.0-1.0)
  • font_size (int) 文字水印基础字号
  • position (str) 位置:center, top-left, top-right, bottom-left, bottom-right
  • rotation (float) 旋转角度
  • layout (str) 布局:singlecornerstile

示例

给 report.pdf 添加 "机密文件" 图片水印,居中并 45° 旋转

依赖

  • fastmcp
  • pymupdf (fitz)
  • pillow

License

MIT

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

pdf_mcp_watermark_image-0.1.3.tar.gz (7.6 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

pdf_mcp_watermark_image-0.1.3-py3-none-any.whl (9.6 kB view details)

Uploaded Python 3

File details

Details for the file pdf_mcp_watermark_image-0.1.3.tar.gz.

File metadata

  • Download URL: pdf_mcp_watermark_image-0.1.3.tar.gz
  • Upload date:
  • Size: 7.6 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.14.0

File hashes

Hashes for pdf_mcp_watermark_image-0.1.3.tar.gz
Algorithm Hash digest
SHA256 b578cb92a6a963b7e5665e1cf26ecdfcd1dd40afa7e185d2086829bca283a9d6
MD5 8c5e53fcfbc8033f093303758c0cd6d3
BLAKE2b-256 ece0cc8a7b0e6840622b27d1d4bb268f9a743af0dbb590459247a98769d6caf4

See more details on using hashes here.

File details

Details for the file pdf_mcp_watermark_image-0.1.3-py3-none-any.whl.

File metadata

File hashes

Hashes for pdf_mcp_watermark_image-0.1.3-py3-none-any.whl
Algorithm Hash digest
SHA256 13e47c9a1db6f0fd9809fad564fe01840812b8949aa11f3fcd91f63be3797638
MD5 e63ca1d6946403016f7e38e449b7a051
BLAKE2b-256 6cd2d23f4c963a51e26bebac9f45b11e1d01c19eee2a92c17ca33ccb9f8dc289

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page