nutrient-document-processing

使用 Nutrient DWS API 进行文档处理、转换、OCR、提取、脱敏、签名以及表单填充。支持 PDF、DOCX、XLSX、PPTX、HTML 和图像格式。

351 stars

Best use case

nutrient-document-processing is best used when you need a repeatable AI agent workflow instead of a one-off prompt. It is especially useful for teams working in multi. 使用 Nutrient DWS API 进行文档处理、转换、OCR、提取、脱敏、签名以及表单填充。支持 PDF、DOCX、XLSX、PPTX、HTML 和图像格式。

使用 Nutrient DWS API 进行文档处理、转换、OCR、提取、脱敏、签名以及表单填充。支持 PDF、DOCX、XLSX、PPTX、HTML 和图像格式。

Users should expect a more consistent workflow output, faster repeated execution, and less time spent rewriting prompts from scratch.

Practical example

Example input

Use the "nutrient-document-processing" skill to help with this workflow task. Context: 使用 Nutrient DWS API 进行文档处理、转换、OCR、提取、脱敏、签名以及表单填充。支持 PDF、DOCX、XLSX、PPTX、HTML 和图像格式。

Example output

A structured workflow result with clearer steps, more consistent formatting, and an output that is easier to reuse in the next run.

When to use this skill

  • Use this skill when you want a reusable workflow rather than writing the same prompt again and again.

When not to use this skill

  • Do not use this when you only need a one-off answer and do not need a reusable workflow.
  • Do not use it if you cannot install or maintain the related files, repository context, or supporting tools.

Installation

Claude Code / Cursor / Codex

$curl -o ~/.claude/skills/nutrient-document-processing/SKILL.md --create-dirs "https://raw.githubusercontent.com/xu-xiang/everything-claude-code-zh/main/docs/ja-JP/skills/nutrient-document-processing/SKILL.md"

Manual Installation

  1. Download SKILL.md from GitHub
  2. Place it in .claude/skills/nutrient-document-processing/SKILL.md inside your project
  3. Restart your AI agent — it will auto-discover the skill

How nutrient-document-processing Compares

Feature / Agentnutrient-document-processingStandard Approach
Platform SupportNot specifiedLimited / Varies
Context Awareness High Baseline
Installation ComplexityUnknownN/A

Frequently Asked Questions

What does this skill do?

使用 Nutrient DWS API 进行文档处理、转换、OCR、提取、脱敏、签名以及表单填充。支持 PDF、DOCX、XLSX、PPTX、HTML 和图像格式。

Where can I find the source code?

You can find the source code on GitHub using the link provided at the top of the page.

SKILL.md Source

# Nutrient 文档处理 (Document Processing)

使用 [Nutrient DWS 处理程序 API (Processor API)](https://www.nutrient.io/api/) 处理文档。它可以进行格式转换、文本与表格提取、扫描文档的光学字符识别 (OCR)、个人身份信息 (PII) 脱敏、添加水印、数字签名以及 PDF 表单填充。

## 设置 (Setup)

请在 **[nutrient.io](https://dashboard.nutrient.io/sign_up/?product=processor)** 获取免费的 API 密钥。

```bash
export NUTRIENT_API_KEY="pdf_live_..."
```

所有请求都以多部分 POST (multipart POST) 的形式发送到 `https://api.nutrient.io/build`,其中包含 `instructions` JSON 字段。

## 操作 (Operations)

### 文档转换

```bash
# 从 DOCX 转换为 PDF
curl -X POST https://api.nutrient.io/build \
  -H "Authorization: Bearer $NUTRIENT_API_KEY" \
  -F "document.docx=@document.docx" \
  -F 'instructions={"parts":[{"file":"document.docx"}]}' \
  -o output.pdf

# 从 PDF 转换为 DOCX
curl -X POST https://api.nutrient.io/build \
  -H "Authorization: Bearer $NUTRIENT_API_KEY" \
  -F "document.pdf=@document.pdf" \
  -F 'instructions={"parts":[{"file":"document.pdf"}],"output":{"type":"docx"}}' \
  -o output.docx

# 从 HTML 转换为 PDF
curl -X POST https://api.nutrient.io/build \
  -H "Authorization: Bearer $NUTRIENT_API_KEY" \
  -F "index.html=@index.html" \
  -F 'instructions={"parts":[{"html":"index.html"}]}' \
  -o output.pdf
```

支持的输入格式:PDF、DOCX、XLSX、PPTX、DOC、XLS、PPT、PPS、PPSX、ODT、RTF、HTML、JPG、PNG、TIFF、HEIC、GIF、WebP、SVG、TGA、EPS。

### 文本与数据提取

```bash
# 提取纯文本
curl -X POST https://api.nutrient.io/build \
  -H "Authorization: Bearer $NUTRIENT_API_KEY" \
  -F "document.pdf=@document.pdf" \
  -F 'instructions={"parts":[{"file":"document.pdf"}],"output":{"type":"text"}}' \
  -o output.txt

# 将表格提取为 Excel
curl -X POST https://api.nutrient.io/build \
  -H "Authorization: Bearer $NUTRIENT_API_KEY" \
  -F "document.pdf=@document.pdf" \
  -F 'instructions={"parts":[{"file":"document.pdf"}],"output":{"type":"xlsx"}}' \
  -o tables.xlsx
```

### 扫描文档的 OCR

```bash
# 对扫描件进行 OCR 并生成可搜索的 PDF(支持 100 多种语言)
curl -X POST https://api.nutrient.io/build \
  -H "Authorization: Bearer $NUTRIENT_API_KEY" \
  -F "scanned.pdf=@scanned.pdf" \
  -F 'instructions={"parts":[{"file":"scanned.pdf"}],"actions":[{"type":"ocr","language":"english"}]}' \
  -o searchable.pdf
```

语言:通过 ISO 639-2 代码支持 100 多种语言(例如:`eng`、`deu`、`fra`、`spa`、`jpn`、`kor`、`chi_sim`、`chi_tra`、`ara`、`hin`、`rus`)。完整语言名称如 `english` 或 `german` 也可使用。有关所有受支持的代码,请参阅 [完整 OCR 语言列表](https://www.nutrient.io/guides/document-engine/ocr/language-support/)。

### 敏感信息脱敏 (Redaction)

```bash
# 基于模式(社会安全号码 SSN、电子邮件)
curl -X POST https://api.nutrient.io/build \
  -H "Authorization: Bearer $NUTRIENT_API_KEY" \
  -F "document.pdf=@document.pdf" \
  -F 'instructions={"parts":[{"file":"document.pdf"}],"actions":[{"type":"redaction","strategy":"preset","strategyOptions":{"preset":"social-security-number"}},{"type":"redaction","strategy":"preset","strategyOptions":{"preset":"email-address"}}]}' \
  -o redacted.pdf

# 基于正则表达式
curl -X POST https://api.nutrient.io/build \
  -H "Authorization: Bearer $NUTRIENT_API_KEY" \
  -F "document.pdf=@document.pdf" \
  -F 'instructions={"parts":[{"file":"document.pdf"}],"actions":[{"type":"redaction","strategy":"regex","strategyOptions":{"regex":"\\b[A-Z]{2}\\d{6}\\b"}}]}' \
  -o redacted.pdf
```

预设 (Presets):`social-security-number`、`email-address`、`credit-card-number`、`international-phone-number`、`north-american-phone-number`、`date`、`time`、`url`、`ipv4`、`ipv6`、`mac-address`、`us-zip-code`、`vin`。

### 添加水印 (Watermarking)

```bash
curl -X POST https://api.nutrient.io/build \
  -H "Authorization: Bearer $NUTRIENT_API_KEY" \
  -F "document.pdf=@document.pdf" \
  -F 'instructions={"parts":[{"file":"document.pdf"}],"actions":[{"type":"watermark","text":"CONFIDENTIAL","fontSize":72,"opacity":0.3,"rotation":-45}]}' \
  -o watermarked.pdf
```

### 数字签名 (Digital Signatures)

```bash
# 自签名 CMS 签名
curl -X POST https://api.nutrient.io/build \
  -H "Authorization: Bearer $NUTRIENT_API_KEY" \
  -F "document.pdf=@document.pdf" \
  -F 'instructions={"parts":[{"file":"document.pdf"}],"actions":[{"type":"sign","signatureType":"cms"}]}' \
  -o signed.pdf
```

### PDF 表单填充 (Form Filling)

```bash
curl -X POST https://api.nutrient.io/build \
  -H "Authorization: Bearer $NUTRIENT_API_KEY" \
  -F "form.pdf=@form.pdf" \
  -F 'instructions={"parts":[{"file":"form.pdf"}],"actions":[{"type":"fillForm","formFields":{"name":"Jane Smith","email":"jane@example.com","date":"2026-02-06"}}]}' \
  -o filled.pdf
```

## MCP 服务端 (代替方案)

对于原生工具集成,使用 MCP 服务端 (MCP Server) 代替 curl:

```json
{
  "mcpServers": {
    "nutrient-dws": {
      "command": "npx",
      "args": ["-y", "@nutrient-sdk/dws-mcp-server"],
      "env": {
        "NUTRIENT_DWS_API_KEY": "YOUR_API_KEY",
        "SANDBOX_PATH": "/path/to/working/directory"
      }
    }
  }
}
```

## 使用场景

- 不同格式间的文档转换(PDF、DOCX、XLSX、PPTX、HTML、图像)
- 从 PDF 提取文本、表格和键值对
- 对扫描文档或图像进行 OCR
- 在共享文档前对 PII 进行脱敏
- 在草案或机密文档中添加水印
- 对合同或协议进行数字签名
- 以编程方式填充 PDF 表单

## 相关链接

- [API 游乐场 (Playground)](https://dashboard.nutrient.io/processor-api/playground/)
- [完整 API 文档](https://www.nutrient.io/guides/dws-processor/)
- [npm MCP 服务端](https://www.npmjs.com/package/@nutrient-sdk/dws-mcp-server)

Related Skills

plankton-code-quality

351
from xu-xiang/everything-claude-code-zh

使用 Plankton 实现编写时代码质量强制执行 —— 通过钩子在每次文件编辑时进行自动格式化、代码检查,并由 Claude 驱动自动修复。

autonomous-loops

351
from xu-xiang/everything-claude-code-zh

自主运行 Claude Code 循环的模式与架构 —— 从简单的顺序流水线到 RFC 驱动的多智能体 DAG 系统。

visa-doc-translate

351
from xu-xiang/everything-claude-code-zh

将签证申请文件(图片)翻译成英文,并创建包含原文和译文的双语PDF

swiftui-patterns

351
from xu-xiang/everything-claude-code-zh

SwiftUI 架构模式,使用 @Observable 进行状态管理,视图组合,导航,性能优化,以及现代 iOS/macOS UI 最佳实践。

swift-protocol-di-testing

351
from xu-xiang/everything-claude-code-zh

基于协议的依赖注入,用于可测试的Swift代码——使用聚焦协议和Swift Testing模拟文件系统、网络和外部API。

swift-concurrency-6-2

351
from xu-xiang/everything-claude-code-zh

Swift 6.2 可接近的并发性 — 默认单线程,@concurrent 用于显式后台卸载,隔离一致性用于主 actor 类型。

swift-actor-persistence

351
from xu-xiang/everything-claude-code-zh

在 Swift 中使用 actor 实现线程安全的数据持久化——基于内存缓存与文件支持的存储,通过设计消除数据竞争。

skill-stocktake

351
from xu-xiang/everything-claude-code-zh

用于审计Claude技能和命令的质量。支持快速扫描(仅变更技能)和全面盘点模式,采用顺序子代理批量评估。

search-first

351
from xu-xiang/everything-claude-code-zh

研究优先于编码的工作流程。在编写自定义代码之前,搜索现有的工具、库和模式。调用研究员代理。

regex-vs-llm-structured-text

351
from xu-xiang/everything-claude-code-zh

选择在解析结构化文本时使用正则表达式还是大型语言模型的决策框架——从正则表达式开始,仅在低置信度的边缘情况下添加大型语言模型。

liquid-glass-design

351
from xu-xiang/everything-claude-code-zh

iOS 26 液态玻璃设计系统 — 适用于 SwiftUI、UIKit 和 WidgetKit 的动态玻璃材质,具有模糊、反射和交互式变形效果。

foundation-models-on-device

351
from xu-xiang/everything-claude-code-zh

苹果FoundationModels框架用于设备上的LLM——文本生成、使用@Generable进行引导生成、工具调用,以及在iOS 26+中的快照流。