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.2.tar.gz (7.7 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.2-py3-none-any.whl (9.7 kB view details)

Uploaded Python 3

File details

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

File metadata

  • Download URL: pdf_mcp_watermark_image-0.1.2.tar.gz
  • Upload date:
  • Size: 7.7 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.2.tar.gz
Algorithm Hash digest
SHA256 5d5d3db48aa7527dc919b85427ce4b7817cbafdb70580063c9b86fae6a51d993
MD5 0a3686197f6aab7680b2ce52257820b5
BLAKE2b-256 c63abe1519755a05a8176918ad580a9f5cbc3bcc5b1b26880f3c588d05e1b5a0

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for pdf_mcp_watermark_image-0.1.2-py3-none-any.whl
Algorithm Hash digest
SHA256 f6e823e2087fd1fffb378293e5901ee72d53245d56c35a92879662a4155cce9b
MD5 5c29cc6763d749aef40b3c2e4a2698ca
BLAKE2b-256 fa3fa3bb9355ff02502f15d3cfc84f19db89b36cc9621761a454a1a66aac3aa2

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