← 返回
未分类

PDF Simple Tool

PDF splitting and PDF-to-Word conversion tools implemented in Node.js.
基于 Node.js 实现的 PDF 拆分与 PDF 转 Word 工具。
daguniang daguniang 来源
未分类 clawhub v1.2.0 1 版本 99797.6 Key: 无需
★ 1
Stars
📥 473
下载
💾 7
安装
1
版本
#latest

概述

PDF Simple Tool Skill

This skill provides two main actions for working with PDF files:

  1. split_pdf – Extract a page range from a PDF into a new PDF.
  2. pdf_to_word – Convert a PDF into a simple Word (.docx) document.

Install

cd skills/pdf-simple-tool/node/

执行命令: npm install

Actions

split_pdf

When the user asks to split a PDF by page range (for example, "把这个 PDF 的第 3-5 页拆出来" / "split pages 3–5"), call the Node implementation:

  • Entry: skills/pdf-simple-tool/node/index.js
  • Function: splitPdf(inputPath, outputPath, fromPage, toPage)

Inputs

  • inputPath (string): The absolute path to the source PDF.
  • outputPath (string): The absolute path where the new PDF will be written.
  • fromPage (integer): Start page (1-based).
  • toPage (integer): End page (1-based, inclusive).

Example behavior:

  • If the user says: "帮我把 /Users/xingxing/.openclaw/workspace/test.pdf 的第 1-3 页拆成一个 PDF 文件",

map this to:

  • inputPath = "/Users/xingxing/.openclaw/workspace/test.pdf"
  • outputPath = "/Users/xingxing/.openclaw/workspace/test_p1-3.pdf"
  • fromPage = 1
  • toPage = 3

pdf_to_word

When the user asks to convert a PDF to Word (for example, "把这个 PDF 转成 Word" / "convert to docx"), call the Node implementation:

  • Entry: skills/pdf-simple-tool/node/index.js
  • Function: pdfToWord(inputPath, outputPath)

Inputs

  • inputPath (string): The absolute path to the source PDF.
  • outputPath (string): The absolute path where the Word file (.docx) will be written.

Example behavior:

  • If the user says: "把 /Users/xingxing/.openclaw/workspace/test.pdf 转成 Word",

map this to:

  • inputPath = "/Users/xingxing/.openclaw/workspace/test.pdf"
  • outputPath = "/Users/xingxing/.openclaw/workspace/test.docx"

Notes

  • Implementation code lives in skills/pdf-simple-tool/node/index.js and uses:
  • pdf-lib for PDF manipulation.
  • pdf-parse + docx for PDF-to-Word conversion.
  • You are responsible for wiring these actions into your agent so that natural language

requests are converted into the appropriate function calls with the correct paths and page ranges.

版本历史

共 1 个版本

  • v1.2.0 当前
    2026-03-31 06:40 安全 安全

安全检测

腾讯云安全 (Keen)

安全,无风险
查看报告

腾讯云安全 (Sanbu)

安全,无风险
查看报告

🔗 相关推荐

office-efficiency

Gog

steipete
Google Workspace 命令行工具,支持 Gmail、日历、云端硬盘、通讯录、表格和文档。
★ 926 📥 186,798
office-efficiency

Excel / XLSX

ivangdavila
创建、检查和编辑 Microsoft Excel 工作簿及 XLSX 文件,支持可靠的公式、日期、类型、格式、重算及模板保留功能。
★ 381 📥 144,433
professional

Stock Tools

daguniang
自选股管理与A股行情对话能力。Use when the user asks in natural language to add/remove/list/clear watchlist stocks, or asks about a sto
★ 0 📥 856