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.4.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.4-py3-none-any.whl (9.6 kB view details)

Uploaded Python 3

File details

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

File metadata

  • Download URL: pdf_mcp_watermark_image-0.1.4.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.4.tar.gz
Algorithm Hash digest
SHA256 5ea1c984ac306b47f10ecf4e98981e2a17e6c1bcd877ab7bddd58d2e14e064b6
MD5 923f866d2f77b41cc10409462c0812fa
BLAKE2b-256 95c838609b62a889e91701bab3261d0e3c3bf828a19803b9b781451fea0439e2

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for pdf_mcp_watermark_image-0.1.4-py3-none-any.whl
Algorithm Hash digest
SHA256 0e3f5b0726ba771797c5c786ad49ee1499a117677d77e7b1732a2e368ad316ef
MD5 91b425a64bab5139f5d2b8dece6a5360
BLAKE2b-256 5c758f65e80b67e7d68fd64a5ca92c0f841de8c778355e8b8b87dffdf05bd95a

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