🎯 Vấn đề cần giải quyết
Cần ký hợp đồng PDF gấp mà không có scanner? Thêm chữ ký vào nhiều documents? Stamp ngày ký vào file?
Pain points:
- Print → Sign → Scan mất thời gian
- Chữ ký không đẹp khi scan
- Không có chữ ký digital
⚖️ So sánh: Trước và Sau
| Tiêu chí | Print-Sign-Scan | Digital Sign |
|---|---|---|
| Thời gian | 10+ phút | 30 giây |
| Chất lượng | Mờ | Sắc nét |
| Lưu trữ | Cần scan | Digital ready |
💡 Prompt mẫu
Ký tên vào PDF:
INPUT:
- PDF document: [file]
- Signature: [image file, transparent PNG]
SIGNATURE PLACEMENT:
- Page: last / specific page number
- Position: bottom right / signature field
- Size: 150px width
ADDITIONAL:
- Date stamp: Có (format: DD/MM/YYYY)
- Name text: "Nguyễn Văn A"
- Company stamp: [stamp image]
OUTPUT:
- Suffix: _signed
- Flatten: Có (prevent editing)
🏗️ Phase 2: Architect (Permanent Tool)
For Managers/Approvers.
Engineering Prompt:
**Role:** Python GUI Developer (PyQt6 Specialist)
**Task:** Create "Digital Signature Pad" Desktop App
**Objective:** A desktop app to place signatures and stamps on PDF documents efficiently.
**Tech Stack:**
* Language: Python 3.10+
* GUI Library: PyQt6 (Cross-platform)
* PDF Engine: PyPDF2 / reportlab
* Packaging: PyInstaller
**Functional Requirements:**
1. **UI Layout (PyQt6):**
* **Input:** PDF File.
* **Signatures:** "Manage Signatures" (Add Image/Draw).
* **Placement:** Drag & Drop signature overlay on page preview.
* **Page Nav:** Next/Prev Page.
2. **Core Logic:**
* Render PDF Page as background.
* Overlay transparent signature image.
* Calculate relative coordinates.
* Merge overlay PDF with source using `pypdf`.
* **Threading:** Rendering in background.
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
Signature types
| Type | Legal weight |
|---|---|
| Image signature | Basic |
| Digital signature (PKI) | Strong |
| Certified signature | Highest |
Creating signature image
- Sign on white paper
- Scan or photo
- Remove background (transparent PNG)
- Crop tight
- Save as PNG
Batch signing
- Sign nhiều files cùng lúc
- Same position each file
- Add date automatically
- Number documents
Legal considerations
- Check if digital sig accepted
- Some require wet signature
- Keep records of signing
Độ khó: ⭐ Beginner | Thời gian: 3 phút