Chuyển đến nội dung
Skillpedia
PDF, Word và slide260k · #611

pdf

Skill này làm gì

Skill này giúp AI của bạn xử lý nhiều tác vụ PDF, từ tạo báo cáo đến điền biểu mẫu. Skill dành cho bất kỳ ai làm việc với file PDF và muốn chúng được xử lý tự động.

Khi nào nên dùng

  • ✓Khi bạn muốn tạo một báo cáo, hóa đơn hoặc tài liệu nhiều trang dưới dạng PDF.
  • ✓Khi bạn muốn điền một biểu mẫu PDF có thể điền hoặc lấy văn bản và bảng từ PDF.
  • ✓Khi bạn muốn gộp, tách, xoay, đóng hình mờ hoặc mã hóa các file PDF.

Liên kết skill

https://github.com/NousResearch/hermes-agent/blob/main/skills/productivity/pdf/SKILL.md

Sao chép rồi dán vào AI của bạn (Claude, ChatGPT hoặc Cursor) và nhờ nó làm theo hướng dẫn.

Cách dùng

Cách dễ nhất: sao chép tin nhắn và dán vào AI của bạn. AI sẽ đọc skill và làm theo hướng dẫn.

Tin nhắn có sẵn để dán

Hãy dùng skill này để giúp tôi: https://github.com/NousResearch/hermes-agent/blob/main/skills/productivity/pdf/SKILL.md Đọc tệp SKILL.md tại liên kết đó và làm theo hướng dẫn cho việc của tôi.
Bạn muốn AI tự tìm những skill như thế này?Cài MCP Skillpedia miễn phí: chỉ một dòng, và AI sẽ tìm trong 15.000+ skill trước mỗi việc.Cài đặt trong 1 phút →

Ví dụ cách nhờ AI

“Gộp ba hóa đơn PDF này thành một file và thêm hình mờ Draft vào mỗi trang.”

5 skill mới mỗi tuần. Đọc chỉ 1 phút.

Cách hoạt động

Skill dùng các công cụ Python như pypdf, reportlab và pdfplumber để đọc, tạo và thay đổi PDF. Với file quét, skill dùng một tài liệu tham khảo OCR riêng, còn để sửa văn bản thì dùng một công cụ chỉnh sửa riêng.

Nội dung kỹ thuật (SKILL.md gốc)

Lấy nguyên văn từ GitHub, do tác giả viết bằng tiếng Anh.

PDF Skill

Create PDFs from structured specs, build and fill AcroForm forms (with layout linting and visual overlays), extract text/tables/metadata, merge/split/rotate/watermark/stamp pages, export page images, manage metadata and attachments, and encrypt/decrypt — using pypdf, reportlab, and pdfplumber. Two absorbed capabilities live in references/ (read the matching file before those tasks):

  • Scanned/image-only PDFs and OCR (pymupdf fast path, marker-pdf quality path, scripts/extract_pymupdf.py + scripts/extract_marker.py): references/ocr-extraction.md
  • Editing text inside an existing PDF via natural-language prompts (nano-pdf CLI): references/nano-pdf-editing.md

When to Use

  • Generate a report, invoice, or multi-page document as PDF.
  • Build a fillable AcroForm (text/checkbox/radio/dropdown) from a JSON spec, linting the layout first.
  • Pull text, tables (JSON/CSV), metadata, or form-field values out of a PDF.
  • Merge, split, rotate, extract page subsets, watermark, stamp text/images at coordinates, bookmark, or compress PDFs.
  • Export pages as PNGs for visual review or for OCR hand-off; set/clear document metadata; add/extract file attachments.
  • Fill or flatten AcroForm forms; encrypt or decrypt with passwords.
  • NOT for scanned/image-only PDFs (use references/ocr-extraction.md) and NOT for pixel-perfect HTML-to-PDF rendering (use a headless browser).

Prerequisites

  • Python 3.10+ with pypdf, reportlab, pdfplumber.

  • Pick the interpreter with terminal. Use python when it already imports the libraries (the Hermes Docker image ships them). Otherwise, when hermes is on PATH, let Hermes build its shared, pinned documents environment under the Hermes home: it survives container restarts, never touches the Hermes install itself, and is safe to run from several agents at once. When it is not (the terminal runs in a Docker sandbox, which has no Hermes), the block builds a venv in the sandbox home with the same pinned versions. Use this exact block in every document skill so they all share one environment:

    python -c "import pypdf, reportlab, pdfplumber" 2>/dev/null && PY=python || if command -v hermes >/dev/null 2>&1; then
      PY="$(hermes pm environment documents --extra documents --extra documents-pdf)"
    else
      PY="$HOME/.cache/hermes-docs-venv/bin/python"
      "$PY" -c "import docx, openpyxl, pptx, reportlab, pypdf, pdfplumber, pypdfium2" 2>/dev/null || (
        # Safe to run from several agents at once: each caller builds a private venv,
        # a symlink publishes the first finished one atomically, the others delete theirs;
        # a published build is replaced and deleted only while it still fails to import.
        mkdir -p "$HOME/.cache" && cd "$HOME/.cache" && stage="$(mktemp -d hermes-docs-venv.XXXXXX)" || exit 1
        old="$(readlink hermes-docs-venv)"  # the published build, if any (another agent may have just published it)
        python3 -m venv "$stage" &&
          "$stage/bin/python" -m pip install -q --disable-pip-version-check python-docx==1.2.0 openpyxl==3.1.5 python-pptx==1.0.2 reportlab==5.1.0 pypdf==6.21.2 pdfplumber==0.11.10 pypdfium2==5.14.0 &&
          "$stage/bin/python" -c "import docx, openpyxl, pptx, reportlab, pypdf, pdfplumber, pypdfium2" &&
          if [ -z "$old" ]; then python3 -c 'import os, sys; os.symlink(*sys.argv[1:])' "$stage" hermes-docs-venv
          elif [ "$(readlink hermes-docs-venv)" = "$old" ] && ! "$old/bin/python" -c "import docx, openpyxl, pptx, reportlab, pypdf, pdfplumber, pypdfium2" 2>/dev/null; then
            ln -s "$stage" "$stage.lnk" && python3 -c 'import os, sys; os.replace(*sys.argv[1:])' "$stage.lnk" hermes-docs-venv &&
              case "$old" in hermes-docs-venv.??????) rm -rf "$old" ;; esac
          fi 2>/dev/null
        [ "$(readlink hermes-docs-venv)" = "$stage" ] || rm -rf "$stage" "$stage.lnk"
      )
    fi
    export PY
    "$PY" scripts/pdf_create.py --help
    

    Run every helper below with "$PY". In PowerShell (Hermes runs on that host, so it is on PATH): $env:PY = hermes pm environment documents --extra documents --extra documents-pdf. Never pip install into the interpreter that runs Hermes or into the hermes pm environment one; Hermes owns both.

  • Page rasterization (pdf_page_image.py, overlay rendering) uses pypdfium2, which the documents environment already has (if your python lacks it, switch PY to that environment with the command above), or poppler's pdftoppm on PATH.

Câu hỏi thường gặp

Có hoạt động với PDF quét không?

Không trực tiếp. Skill cho biết file PDF quét cần file tham khảo OCR của nó, dùng các công cụ khác.

Có điền được biểu mẫu không?

Có. Skill bao gồm việc tạo và điền biểu mẫu có thể điền với trường văn bản, hộp kiểm, nút chọn và danh sách thả xuống.

Có tạo được PDF từ trang web hoàn hảo từng pixel không?

Không. Skill cho biết trình duyệt headless là lựa chọn tốt hơn cho kiểu chuyển HTML sang PDF này.

Chi tiết

Mô tả gốc của tác giả

PDF files: create, read, merge, fill, OCR, edit text.

repo: NousResearch/hermes-agent

Độ phổ biến

Sao GitHub
260k
Vị trí xếp hạng
#611
Giấy phép
MIT
Cập nhật
2/11/2026

Skill này có hữu ích không?

0

Đăng nhập để bình chọn.

Bình luận

  • …

Thêm skill từ kho mã này

Skill tương tự