A Python application that converts HTML files in a directory to PDF format using WeasyPrint. Available in both GUI and CLI versions.
This tool allows users to batch convert HTML files to professional-quality PDFs using either a graphical interface or command-line.
- Fully functional GUI and CLI implementations
- Tkinter-based graphical interface with directory pickers
- Command-line interface for automation
- Support for .html and .htm file extensions
- Real-time progress tracking and error handling
-
2025-10-09: GUI implementation
- Added Tkinter-based graphical interface (html2pdf_gui.py)
- Directory selection dialogs for input/output
- Real-time status updates with color-coded messages
- Threading for responsive UI during conversion
- Updated workflow to launch GUI application
-
2025-10-09: Initial project setup
- Installed Python 3.11 and WeasyPrint
- Created main conversion script (html2pdf.py)
- Added command-line argument parsing
- Implemented batch conversion with progress reporting
-
html2pdf_gui.py: GUI application (primary interface)
- Tkinter-based graphical interface
- Directory picker dialogs
- Real-time status updates with threading
- Color-coded logging (success/error/info/summary)
- Responsive UI during conversions
-
html2pdf.py: CLI version
- Command-line interface using argparse
- Directory scanning for HTML files
- Individual file conversion using WeasyPrint
- Error handling and progress reporting
- Python 3.11
- WeasyPrint 66.0 (HTML to PDF conversion engine)
- Supporting libraries: Pillow, fonttools, cssselect2, tinycss2
python html2pdf.py <input_directory> [-o <output_directory>]None specified yet.