视觉画布设计
canvas-design
基于设计原则创作静态视觉作品,用于海报与品牌图形。
pymupdf【文档与办公】Use PyMuPDF for document opening, text/table/RAG extraction, rendering, image and graphics work, PDF editing, annotations, forms, CLI checks, and maintenance triage.
独立 GitHub 快照 · 自动分类 · 以原作者文档为准
Use this skill when a task involves the PyMuPDF package (import pymupdf) for PDF and document processing: opening or converting documents, extracting text/tables/images, rendering pages, editing PDFs, adding annotations/forms/redactions, using the pymupdf CLI, or diagnosing PyMuPDF install/build/runtime issues.
Prefer import pymupdf in all new code. Treat import fitz as deprecated compatibility only; an unrelated package named fitz can break legacy imports.
python -m pip install --upgrade pymupdf
python - <<'PY'
import pymupdf
print(pymupdf.__version__)
doc = pymupdf.open()
page = doc.new_page(width=200, height=100)
page.insert_text((36, 60), "PyMuPDF ok")
assert pymupdf.open(stream=doc.tobytes(), filetype="pdf")[0].get_text().strip() == "PyMuPDF ok"
PY
PyMuPDF has no mandatory runtime Python dependencies when a wheel is available. Source builds need C/C++ tooling and build MuPDF; read references/troubleshooting.md and references/optional-dependencies.md before choosing that path.
| Task intent | Read first |
|---|---|
Open files or bytes, create PDFs, authenticate, inspect metadata/TOC, convert supported inputs to PDF, choose safe save modes, reason about Rect/Point/Matrix/Quad | sub-skills/document-core/SKILL.md |
| Extract text, words, blocks, dict/rawdict layout, search text, detect/extract tables, prepare Markdown/JSON/plain text for RAG, understand OCR/PyMuPDF4LLM boundaries | sub-skills/text-tables-and-rag/SKILL.md |
| Render pages, thumbnails, clips, alpha/color spaces, Pixmaps, embedded image extraction/insertion, image masks, drawing/vector graphics, Story/TextWriter visual layout | sub-skills/rendering-images-and-graphics/SKILL.md |
| Merge/reorder PDFs, annotations, permanent redaction, links, outlines, widgets/forms, embedded files, optional content groups, save semantics for edits | sub-skills/pdf-editing-annotations-forms/SKILL.md |
Use pymupdf / python -m pymupdf, CLI subcommands, safe CLI smoke checks, wheel/source-build triage, optional component checks, focused maintainer tests | sub-skills/cli-and-maintenance/SKILL.md |
fitz, optional dependency, save/authentication, and self-containment failures.references/repo-routing-metadata.json contains structured metadata for managed repo-skill routing.python -m pip install --upgrade pymupdf) and import pymupdf.pymupdf-fonts, pandas, and tabulate as optional until verified in the active runtime.This skill was generated for PyMuPDF package version 1.28.2 from a source snapshot recorded in references/repo-provenance.md. If the installed package or checkout differs substantially, run refresh-repo-skill before trusting API details that changed across versions.