🎯 Vấn đề cần giải quyết
Nhận hợp đồng PDF cần chỉnh sửa? CV mẫu PDF muốn customize? Tài liệu scan cần edit text?
Pain points:
- Chuyển đổi bị mất format
- Bảng biểu bị vỡ
- Không nhận diện được tiếng Việt
⚖️ So sánh: Trước và Sau
| Tiêu chí | Free converters | Agentic Workflow |
|---|---|---|
| Format accuracy | 60-70% | 90%+ |
| Table handling | Bị vỡ | Giữ nguyên |
| Vietnamese | Sai dấu | Chính xác |
💡 Prompt mẫu
Chuyển PDF sang Word:
INPUT: [file PDF]
CONVERSION SETTINGS:
- Output: DOCX
- OCR: Có (nếu là scan)
- Language: Vietnamese + English
PRESERVE:
- Tables: Có (convert thành Word tables)
- Images: Có (embedded)
- Fonts: Map sang fonts có sẵn
- Layout: Match original
OUTPUT:
- Filename: {original}.docx
- Editable: Có
🏗️ Phase 2: Architect (Permanent Tool)
For Office Workers.
Engineering Prompt:
**Role:** Python GUI Developer (PyQt6 Specialist)
**Task:** Create "PDF to Word Converter Pro" Desktop App
**Objective:** A high-fidelity converter to turn PDFs back into editable Word documents.
**Tech Stack:**
* Language: Python 3.10+
* GUI Library: PyQt6 (Cross-platform)
* Engine: pdf2docx
* Packaging: PyInstaller
**Functional Requirements:**
1. **UI Layout (PyQt6):**
* **Input:** Batch File List.
* **Settings:** "Extract Images", "Detect Tables".
* **Range:** "All Pages" or "Specific Range".
* **Action:** "Convert All".
2. **Core Logic:**
* Initialize `pdf2docx.Converter`.
* Parse structure (Text, Tables, Images).
* Reconstruct DOCX XML.
* **Threading:** Conversion runs in background thread.
3. **Deliverables:**
* `main.py`: Complete source code.
* `requirements.txt`: Dependencies.
* **Build Instructions:**
* Windows: `pyinstaller --onefile --noconsole main.py`
* macOS: `pyinstaller --windowed --noconsole main.py`
🔧 Tips & Best Practices
Conversion quality factors
| PDF type | Quality |
|---|---|
| Native PDF (từ Word) | Excellent |
| Designed PDF | Good |
| Scanned PDF | Depends on OCR |
| Form PDF | Variable |
Post-conversion fixes
- Check fonts (may substitute)
- Verify tables alignment
- Re-link images if needed
- Fix headers/footers
Tools comparison
| Tool | Pros | Cons |
|---|---|---|
| Adobe Acrobat | Best quality | Expensive |
| Python pdf2docx | Free | Limited |
| Pandoc | Free, CLI | Basic |
Độ khó: ⭐⭐ Intermediate | Thời gian: 5 phút