😫 Vấn đề (The Pain Point)
Bạn soạn thảo xong 50 thư mời họp bằng Word. Giờ cần gửi cho đối tác thì phải chuyển sang PDF cho chuyên nghiệp và không bị lỗi định dạng. Mở Word -> Save as PDF -> Chọn tên. Lặp lại 50 lần.
🚀 Giải pháp Agentic (The Solution)
Tool tận dụng Microsoft Word cài sẵn trên máy để convert ngầm (Background), đảm bảo format giống hệt như bạn làm thủ công nhưng nhanh hơn gấp bội.
Tính năng:
- Perfect Format: Vì dùng engine của chính MS Word nên không bao giờ sai lệch bố cục.
- Batch Processing: Xử lý cả folder trong một lần bấm.
🤖 Engineering Prompt (Copy & Paste)
**Role:** Python Automation Developer
**Task:** Create a "Batch Word to PDF Converter" (Windows only).
**Requirements:**
1. **Tech Stack:** Python, `tkinter`, `docx2pdf`.
2. **Prerequisite:** Requires Microsoft Word installed on Windows.
3. **GUI:**
* Select Source Folder (containing .docx).
* Select Output Folder.
* Start Button.
4. **Logic:**
* Use `docx2pdf` library (which automates Word via COM).
* `convert(input_path, output_path)`
* Show progress bar.
5. **Deliverables:**
* `word_2_pdf.py`
* `run.bat`
* `requirements.txt`
**Context:** Admin tasks preparing documents for release.
🧠 Giải mã Prompt
- docx2pdf: Thư viện này thực chất là một “bot” điều khiển MS Word của bạn mở file và lưu lại. Vì vậy nó yêu cầu máy phải có Word. Điều này đảm bảo tính tương thích tuyệt đối.
🛠️ Hướng dẫn
- Copy Prompt -> Paste -> Chạy.
- Đảm bảo đã tắt các file Word đang mở.
- Chọn Folder -> Start.