Office Tools v1.0.1

pdf-to-docx

PDF to DOCX - convert PDF files to Word (.docx) format using MinerU. Requires token. Use when you need an editable Word...

mzlzyca 更新于 2026-04-02 1 浏览
下载 SKILL

技能说明

PDF to DOCX - convert PDF files to Word (.docx) format using MinerU. Requires token. Use when you need an editable Word document from a PDF.

使用场景

Convert PDF files to editable Word (.docx) format using MinerU.

直接复制以下提示词,发送给你的 AI 助手即可完成安装。

帮我下载并安装这个SKILL:https://skillhub.cstcloud.cn/download/pdf-to-docx
  1. 点击上方「下载 SKILL」按钮,获取技能压缩包。
  2. 将压缩包解压到你的 Agent 技能目录。
  3. 重启客户端后即可在技能列表中选择该技能。

技能文件内容

3 个文件 · 21 kB
SKILL.md text/markdown
---
name: pdf-to-docx
description: "PDF to DOCX - convert PDF files to Word (.docx) format using MinerU. Requires token. Use when you need an editable Word document from a PDF."
homepage: https://mineru.net
metadata: {"openclaw": {"emoji": "📄", "requires": {"bins": ["mineru-open-api"], "env": ["MINERU_TOKEN"]}, "primaryEnv": "MINERU_TOKEN", "install": [{"id": "npm", "kind": "node", "package": "mineru-open-api", "bins": ["mineru-open-api"], "label": "Install via npm"}, {"id": "go", "kind": "go", "package": "github.com/opendatalab/MinerU-Ecosystem/cli/mineru-open-api", "bins": ["mineru-open-api"], "label": "Install via go install", "os": ["darwin", "linux"]}]}}
---

# PDF to DOCX

Convert PDF files to editable Word (.docx) format using MinerU.

> ⚠️ **Token required.** `flash-extract` does not support DOCX output. You must configure a token via `mineru-open-api auth` before using this skill.
>
> ⚠️ **Output to file required.** DOCX is a binary format and cannot be streamed to stdout — you must always specify `-o <directory>`.

## Install

```bash
npm install -g mineru-open-api
# or via Go (macOS/Linux):
go install github.com/opendatalab/MinerU-Ecosystem/cli/mineru-open-api@latest
```

## Authentication

Token required — create one at https://mineru.net/apiManage/token:

```bash
mineru-open-api auth             # Interactive token setup
export MINERU_TOKEN="your-token" # Or via environment variable
```

## Quick Start

```bash
# Convert PDF to DOCX (token required, -o is mandatory)
mineru-open-api extract report.pdf -f docx -o ./out/

# From URL
mineru-open-api extract https://example.com/report.pdf -f docx -o ./out/

# With language hint
mineru-open-api extract report.pdf -f docx --language en -o ./out/

# With VLM model for better layout accuracy (complex PDFs)
mineru-open-api extract report.pdf -f docx --model vlm -o ./out/

# Batch convert multiple PDFs
mineru-open-api extract *.pdf -f docx -o ./out/
```

## Capabilities

- Supported input: .pdf (local file or URL)
- Output format: Word (.docx) via `-f docx`
- Token required (`mineru-open-api auth` or `MINERU_TOKEN` env)
- `-o <dir>` is mandatory — DOCX cannot stream to stdout
- Language hint with `--language` (default: `ch`, use `en` for English)
- Page range with `--pages` (e.g. `1-10`)
- Batch mode supported: `extract *.pdf -f docx -o ./out/`

## Notes

- `flash-extract` does NOT support DOCX output — always use `extract` with token
- DOCX output cannot be streamed to stdout; `-o` flag is required
- Use `--model vlm` for PDFs with complex layouts, tables, or mixed content
- Use `--model pipeline` if you need guaranteed fidelity with no hallucination risk
- Output directory will be created if it does not exist
- All progress/status messages go to stderr
- MinerU is open-source by OpenDataLab (Shanghai AI Lab): https://github.com/opendatalab/MinerU

文件内容直接读取自技能仓库,仅供安装前审阅;以实际下载的压缩包为准。