pdf-to-html-word

Document conversion tool to transform PDFs into HTML or editable Word (.docx). Preserves text and images (HTML can embed images as base64 with selectable/searchable text), or exports editable .docx while retaining layout, tables, and images. Suitable for secondary content editing, web publishing, and document editing.

Installation

Review the source and dependencies with a prompt. A package is available to download.

Install with an AI assistant

Copy the prompt so your assistant can review the pinned revision and dependencies first.

View promptHide prompt
Check whether SkillPI Skill Finder is installed for your current agent. If it is missing, install and enable it using the official instructions at https://github.com/Findskills/skillpi. Then use Skill Finder to locate and install "pdf-to-html-word" from this exact SkillPI detail page: https://skillpi.com/skills/deepskill-997857153ea3656ea4c362b1d8ef8eb04c2bc993113bf495a5ff0424e3d4e4f9. Verify the upstream source and version against https://skillhub.cn/skills/user_760f1cc3/pdf-html-word before installing. If they do not match, stop and report the mismatch. Report the installed path and source version.

Source and setup

skillhub.cn

Setup guidance pending

See the original source for supported tools, dependencies, and permissions.

Installation test pending

Document conversion tool to transform PDFs into HTML or editable Word (.docx). Preserves text and images (HTML can embed images as base64 with selectable/searchable text), or exports editable .docx while retaining layout, tables, and images. Suitable for secondary content editing, web publishing, and document editing.

0 Downloads

Introduction source: third_party · user_760f1cc3 · 1.0.0 Reference

SkillPi interpretation

Tasks
Translation pending; see source documentation.
Inputs and outputs
Translation pending; see source documentation.
Software, accounts and paid services
Translation pending; see source documentation.
Testing
Not tested

Browse files

Browse files at the source ↗

Original SKILL.md

Open original ↗
Frontmatter
name: pdf-to-html-word
slug: pdf-to-html-word-jie262682-max
displayName: PDF 转 HTML 与 Word
version: 1.0.0
summary: 把 PDF 一键转成结构化 HTML 或可编辑 Word(.docx),保留文字、图片与版式。
description: 将 PDF 文档转换为 HTML(保留文字与图片,支持 base64 嵌入,文字可选可搜)或 Word .docx(可编辑,保留版式、表格、图片),适合内容二次加工、网页发布与文档编辑。
license: MIT
tags: [PDF, 转换, HTML, Word, docx, 文档]

PDF 转 HTML 与 Word

角色定位

你是一个文档转换助手。用户提供 PDF 文件,你调用本 Skill 内置脚本,把它转换成 HTML 或 Word(.docx),并交付结果文件路径。

能力范围

  • PDF → HTML:抽取文字(可选、可搜索、保留字号层级)与图片(base64 内嵌,单文件即可分发)。输出单个 .html,浏览器直接打开。
  • PDF → Word:生成 .docx,保留版式、表格、图片,可在 Word/WPS/Google Docs 中继续编辑。

不做什么

  • 不做 OCR。扫描件(纯图片 PDF)转出来仍是图片,文字不可选;如需文字,先让用户用 OCR 工具处理。
  • 不做 PDF 加密破解。受密码保护的 PDF 需用户提供密码。
  • 不把 HTML/Word 转回 PDF(超出范围)。

前置依赖

脚本首次运行会自动 pip install 所需库(pdf2docx、PyMuPDF),无需用户手动安装。需要本机有 Python 3.8+。

工作流程

  1. 接收输入:确认 PDF 文件路径。若用户没给绝对路径,先在工作目录定位文件。
  2. 确认目标格式:HTML 还是 Word?未明确时,按"网页发布→HTML,编辑修改→Word"默认判断并告知用户。
  3. 按需指定页码范围:大文件可只转若干页。用户没指定则全转。
  4. 执行脚本(见下方"命令用法")。捕获 stdout/stderr,遇报错照原文反馈。
  5. 交付结果:返回输出文件的绝对路径,并报告页数、耗时、是否含图片。

命令用法

转 Word(.docx)

python scripts/pdf_to_word.py <input.pdf> [output.docx] [--start N] [--end M]

转 HTML

python scripts/pdf_to_html.py <input.pdf> [output.html] [--start N] [--end M] [--no-images]

--start/--end 为 0 基页码,半开区间;--no-images 跳过图片嵌入(体积更小)。

输出示例

成功:

[ok] report.pdf -> report.docx (12 pages, 3.42s, images: yes)

失败(文件不存在):

Error: file not found: ./missing.pdf

失败(加密 PDF):

Error: PDF is encrypted. Provide password via --password

约束

  • 输出文件默认与输入同目录、同名换后缀;用户指定路径时优先用用户的。
  • 转换大文件(>100 页)前先提示用户预计耗时。
  • 不修改、不删除原始 PDF。

Current listing version

1.0.0

Verify the source revision ↗

Safety and assessment details

Quality assessment

Out of 100 · Assessment report from SkillPi LAB.

Scenario Value85/100

Highlights

  • 提供 PDF 转 HTML 和 Word 功能,保留文字、图片与版式,适用于内容二次加工、网页发布与文档编辑
  • 属于明确场景的通用工具,受众广泛,实用性强
Trigger Precision90/100

Highlights

  • description 明确描述了功能(PDF 转 HTML/Word),触发词清晰,覆盖多种使用场景(网页发布、编辑修改)
  • 边界清晰,不易与其他 Skill 重叠
Structure and Standards95/100

Highlights

  • 文档结构完整,包含角色定位、能力范围、不做什么、前置依赖、工作流程、命令用法、输出示例、约束等
  • 步骤清晰,有端到端示例,frontmatter 完整
Execution Reliability88/100

Highlights

  • 提供了具体的脚本调用命令,参数说明清晰,覆盖主要异常(文件不存在、加密 PDF)
  • 前置依赖自动安装,输出结果明确
Evidence Verifiability (mean of the first four)90/100

The arithmetic mean of the first four original scores, rounded to a whole number.

Static text checks

100 / 100 · skillpi-20261123-no-r3-v1

No current rules matched the text.

This score reflects rule matches in the text and is provided for reference before use. It excludes attachments and runtime behavior.

Permissions and checks before use

Automatically summarized from this main document. Matches may be examples or defensive advice; they are not actual permission declarations. Attachments, external dependencies and runtime behavior are not covered.

  • Install or fetch external dependencies

    Use official sources and pin versions. Check install scripts in an isolated environment. This document check does not cover code downloaded later.

    Mentioned in main document · lines 27

These notices grant no permissions. Your host tool must still confirm file changes, secrets, external transfers or costs as needed.

Security rating and access scope

safe · Static evidence review; not a runtime safety guarantee.

Translation pending; see source documentation.

Before use, confirm and authorize actual file access, external services and network destinations in your host. This review grants no runtime permissions.