← ClaudeAtlas

pdflisted

读取、提取、创建和修改 PDF,支持文本/表格/图片提取、合并、拆分、旋转、水印、表单、加密解密与 OCR。用户提到 PDF 文件或要求生成 PDF 时使用。
MrSGSA/math-modeling-skill-dify · ★ 4 · Data & Documents · score 72
Install: claude install-skill MrSGSA/math-modeling-skill-dify
# PDF 工具 许可:专有;完整条款见 `LICENSE.txt`。 ## Path safety - Treat source PDFs as read-only and write new files under the user project directory. - Do not overwrite an input file unless the user explicitly requests it and a recoverable copy exists. - Resolve merge, split, OCR, form, watermark, encryption, and extraction targets before writing; never use the Skill directory as an output location. - After any structural change, reopen the output, verify page count and key content, and visually inspect affected pages when layout matters. - Relative filenames in the examples are placeholders under `PROJECT_ROOT`. Run from the project directory or replace them with resolved project paths; never run an example from the Skill directory when it can create output. - 只有在用户有权访问该 PDF 且主动提供合法密码时才执行解密;不得猜测、破解、绕过或削弱访问控制。密码不得写入日志、文档元数据或默认命令历史。 - 不自动添加、删除或推断 AI 使用披露,也不把模型或厂商名写入默认作者、创建者或文档元数据;是否披露由用户依据适用规则决定。 ## Overview This guide covers essential PDF processing operations using Python libraries and command-line tools. For advanced features, JavaScript libraries, and detailed examples, see `reference.md`. If you need to fill out a PDF form, read `forms.md` and follow its instructions. ## Quick Start ```python from pypdf import PdfReader, PdfWriter # Read a PDF reader = PdfReader("document.pdf") print(f"Pages: {len(reader.pages)}") # Extract text text = "" for page in reader.pages: text += page.extract_text() ``` ## Python Libraries ### pypdf - Basic Operations #### Merge PDFs ```pytho