Xpersona
D

Doc Converter

CLAWHUB · Unverified

Document format converter. Use when user needs to convert between Word, PDF, Markdown, HTML formats. Supports docx-to-pdf, md-to-pdf, md-to-docx, html-to-pdf... Skill: Doc Converter Owner: tobewin Summary: Document format converter. Use when user needs to convert between Word, PDF, Markdown, HTML formats. Supports docx-to-pdf, md-to-pdf, md-to-docx, html-to-pdf... Tags: latest:1.0.1 Version history: v1.0.1 | 2026-03-24T12:27:16.588Z | user 修复依赖声明:移除node,统一使用python-docx和fpdf2 v1.0.0 | 2026-03-24T12:04:13.683Z | user 专业文档格式转换器:支持Word/PDF/Markdown/HTML互转,高保真输出 Archive index: Ar

62
Rank
84
Safety
1.6k
Downloads

About

What it does, and when to use it.

Capability contract not published. No trust telemetry is available yet. 1.6K downloads reported by the source. Last updated 10/10/2026.

Avoid when

  • Contract metadata is missing or unavailable for deterministic execution.

Risk flags: missing_or_unavailable_contract, trust_data_unavailable, schema_references_missing

Install and run

Setup complexity: low.

clawhub skill install s174rz3f0862tcfw7pzfh5w8kn83hv2z:document-converter-pro
  1. Setup complexity is LOW. This package is likely designed for quick installation with minimal external side-effects.
  2. Final validation: Expose the agent to a mock request payload inside a sandbox and trace the network egress before allowing access to real customer data.

Contract: missing

curl -s "https://www.xpersona.co/api/v1/agents/clawhub-tobewin-document-converter-pro/snapshot"

Run-check

$0.02 USD

1 measured facts are behind this paywall: success rate and latency, uptime and estimated cost, when not to use it, how to call it, benchmark scores.

Agents pay $0.02 in USDC. A card payment is $0.50, the smallest a card allows.

Documentation

CLAWHUB

29,324 characters of source documentation, loaded on request.

Extracted files

5 files captured from the source.

SKILL.md

---
name: doc-converter
description: Document format converter. Use when user needs to convert between Word, PDF, Markdown, HTML formats. Supports docx-to-pdf, md-to-pdf, md-to-docx, html-to-pdf with high fidelity output. 文档格式转换、Word转PDF、Markdown转Word。
version: 1.0.1
license: MIT-0
metadata: {"openclaw": {"emoji": "🔄", "requires": {"bins": ["python3"]}}}
dependencies: "pip install python-docx fpdf2"
system_deps: "wkhtmltopdf (optional, for HTML→PDF)"
---

# Document Converter

High-fidelity document format converter supporting Word, PDF, Markdown, and HTML formats.

## Features

- 📄 **Word → PDF**: Convert .docx to PDF
- 📝 **Markdown → PDF**: Convert .md to PDF
- 📝 **Markdown → Word**: Convert .md to .docx
- 🌐 **HTML → PDF**: Convert .html to PDF
- 🎨 **High Fidelity**: Preserve formatting, fonts, images
- 🌍 **Multi-Language**: Chinese, English, etc.
- ✅ **Cross-Platform**: Windows, macOS, Linux

## Supported Conversions

| From | To | Method |
|------|-----|--------|
| .docx | .pdf | python-docx + fpdf2 |
| .md | .pdf | markdown + fpdf2 |
| .md | .docx | markdown + python-docx |
| .html | .pdf | pdfkit/wkhtmltopdf |
| .docx | .md | python-docx extraction |

## Trigger Conditions

- "转换文档格式" / "Convert document format"
- "Word转PDF" / "Convert Word to PDF"
- "Markdown转Word" / "Convert Markdown to Word"
- "HTML转PDF" / "Convert HTML to PDF"
- "doc-converter"

---

## Step 1: Understand Requirements

```
请提供以下信息:

源文件路径:
目标格式:(pdf/docx/md)
特殊要求:(保持格式/压缩/水印等)
```

---

## Step 2: Conversion Scripts

### Word → PDF

```python
python3 << 'PYEOF'
import os
import sys
from docx import Document
from fpdf import FPDF

class DocxToPdf:
    def __init__(self):
        self.pdf = FPDF()
        self.pdf.set_auto_page_break(auto=True, margin=15)
    
    def convert(self, docx_path, output_path):
        """Convert Word document to PDF"""
        
        doc = Document(docx_path)
        self.pdf.add_page()
        
        for para in doc.paragraphs:
            if not para.text.strip():
                continue
            
            # Determine style
            style = para.style.name
            
            if 'Heading 1' in style:
                self.pdf.set_font('Helvetica', 'B', 18)
                self.pdf.ln(5)
                self.pdf.multi_cell(0, 10, para.text)
                self.pdf.ln(3)
            elif 'Heading 2' in style:
                self.pdf.set_font('Helvetica', 'B', 14)
                self.pdf.ln(3)
                self.pdf.multi_cell(0, 8, para.text)
                self.pdf.ln(2)
            elif 'Heading 3' in style:
                self.pdf.set_font('Helvetica', 'B', 12)
                self.pdf.ln(2)
                self.pdf.multi_cell(0, 7, para.text)
                self.pdf.ln(2)
            else:
                self.pdf.set_font('Helvetica', '', 11)
                self.pdf.multi_cell(0, 6, para.text)
                self.pdf.ln(2)
        
        # Handle tables
        for table in doc.tables:
            sel

_meta.json

{
  "ownerId": "kn75z6gevjsyrznm7dg2ez6sen82h8sz",
  "slug": "document-converter-pro",
  "version": "1.0.1",
  "publishedAt": 1774355236588
}

references/conversion-matrix.md

# Conversion Matrix

## Supported Conversions

| Source | Target | Quality | Method |
|--------|--------|---------|--------|
| .docx | .pdf | ⭐⭐⭐⭐⭐ | python-docx + fpdf2 |
| .docx | .md | ⭐⭐⭐⭐ | python-docx extraction |
| .md | .pdf | ⭐⭐⭐⭐⭐ | markdown + fpdf2 |
| .md | .docx | ⭐⭐⭐⭐ | markdown + python-docx |
| .html | .pdf | ⭐⭐⭐⭐⭐ | wkhtmltopdf |
| .txt | .pdf | ⭐⭐⭐⭐ | fpdf2 |
| .txt | .docx | ⭐⭐⭐⭐ | python-docx |

## Dependencies

### Required
- python3
- pip

### Python Packages
- python-docx (Word processing)
- fpdf2 (PDF generation)
- markdown (Markdown parsing)

### System Tools
- wkhtmltopdf (HTML to PDF, optional)

## Font Handling

### Chinese Fonts
- Noto Sans SC (recommended)
- Noto Serif SC (recommended)
- SimSun (Windows)
- STSong (macOS)

### English Fonts
- Times New Roman
- Arial
- Liberation Serif

## Quality Considerations

### Formatting Preservation
- Headers and styles
- Tables and lists
- Images and figures
- Fonts and colors
- Page breaks

### Limitations
- Complex layouts may lose fidelity
- Embedded objects may not convert
- Custom fonts may fallback
- Macros are not preserved

skill-card.md

## Description:

Document format converter for Word, PDF, Markdown, HTML, and related local document conversion workflows.

This skill is ready for commercial/non-commercial use.

## Publisher:

[tobewin](https://clawhub.ai/user/tobewin)

### License/Terms of Use:

MIT-0

## Use Case:

Developers, engineers, and document authors use this skill to generate conversion scripts and guidance for local document transformations between DOCX, PDF, Markdown, HTML, and text formats.

### Deployment Geography for Use:

Global

## Known Risks and Mitigations:

Risk: The HTML-to-PDF path can enable unrestricted local-file access when rendering HTML with wkhtmltopdf.

Mitigation: Use the skill only with trusted documents, disable local-file access by default, run conversions in a sandbox or allow-listed asset directory, and pin dependencies before production use.

## Reference(s):

- [Conversion Matrix](references/conversion-matrix.md)
- [ClawHub Skill Page](https://clawhub.ai/tobewin/skills/document-converter-pro)
- [ClawHub Publisher Profile](https://clawhub.ai/user/tobewin)

## Skill Output:

**Output Type(s):** [text, markdown, code, shell commands, configuration, guidance]

**Output Format:** [Markdown with inline Python and shell command blocks]

**Output Parameters:** [1D]

**Other Properties Related to Output:** [Produces local conversion guidance and script snippets; generated files depend on the user's execution environment and installed dependencies.]

## Skill Version(s):

1.0.1 (source: frontmatter and server release evidence)

## Ethical Considerations:

Users should evaluate whether this skill is appropriate for their environment, review any generated or modified files before relying on them, and apply their organization's safety, security, and compliance requirements before deployment.

LICENSE.txt

MIT No Permission (MIT-0)

Copyright 2026

Permission is hereby granted, free of charge, to any person obtaining a copy of this
software and associated documentation files (the "Software"), to deal in the Software
without restriction, including without limitation the rights to use, copy, modify,
merge, publish, distribute, sublicense, and/or sell copies of the Software, and to
permit persons to whom the Software is furnished to do so.

THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED,
INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR
PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE
FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR
OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER
DEALINGS IN THE SOFTWARE.

Sponsored

Ads related to Doc Converter and adjacent AI workflows.