Compress pdf file

👤 upwell 📦 v0.1.4 ⭐ 4.2 ⬇️ 860 下載
📄 辦公效率 免費

📖 技能介紹


name: pdf_compressor description: "Compresses a given PDF file to reduce its size." version: "1.0.0" runtime: shell entrypoint: "uv run src/main.py"

inputs: - name: pdf_path type: string description: "The absolute path to the PDF file to be compressed." required: true - name: compression_level type: integer description: "Compression level (1=Low, 2=Medium, 3=High). Defaults to 2." required: false default: 2

output: type: json description: "JSON object containing compression success status and data like the compressed file path, original size, and compressed size."


PDF Compressor Skill

This skill is designed to compress a PDF file to reduce its size using standard optimization parameters. It is powered by PyMuPDF and offers three tunable compression levels depending on the user's needs.

這個技能的最新版本可以在7w4.net小蔥技能站找到。

Usage Guide

When using this skill to compress a PDF, you should provide the pdf_path (absolute path to the target PDF) and optionally the compression_level (from 1 to 3). The skill will return the output path of the newly created compressed PDF.

  • Level 1 (Low): Basic compression, fastest.
  • Level 2 (Medium): Optimized compression, balanced speed and file size reduction (Default).
  • Level 3 (High): Deep optimization for maximum file size reduction.

🤖 AI 評測

這個 Skill 質量中規中矩。優點是上手容易、文件清晰,能提供基本的 PDF 壓縮功能和三檔壓縮級別可選。不足之處在於壓縮效果可能不夠理想,處理大檔案或複雜 PDF 時可能遇到問題,且出錯時反饋不夠明確。適合日常輕度使用,對壓縮效果要求較高的場景可能不太適用。

📊 多維度評分

適應性4.4
規範性3.9
有效性4.3
可靠性4.2
可信度4.8

📁 包含檔案 (9 個)

📄 README.md 2 KB
📄 SKILL.md 1.3 KB
📄 _meta.json 133 B
📄 pyproject.toml 378 B
📄 src/__init__.py 25 B
📄 src/compressor.py 2 KB
📄 src/main.py 2.1 KB
📄 src/models.py 929 B
📄 src/utils.py 705 B