A Python utility to convert OpenBoard .ubz files to PDF format. This tool extracts SVG pages from .ubz archives and compiles them into a single PDF document.
- Converts OpenBoard
.ubzfiles to PDF - Handles multiple files in batch
- Modern file handling with
pathlib - Proper temporary directory management
- Comprehensive error handling and user feedback
- SVG parsing validation
- Executable script with proper permissions
Install the required Python packages:
pip3 install svglib reportlab./ubztopdf.py file1.ubz file2.ubz *.ubzConvert a single file:
./ubztopdf.py presentation.ubzConvert multiple files:
./ubztopdf.py lesson1.ubz lesson2.ubz lesson3.ubzConvert all .ubz files in current directory:
./ubztopdf.py *.ubz- PDF files are created in the same directory as the input files
- Output files have the same name as input files but with
.pdfextension - Progress and error messages are printed to stderr
The script includes robust error handling for:
- Invalid file extensions (non-
.ubzfiles) - Missing or corrupted SVG files within archives
- Archive extraction failures
- SVG parsing errors
This project is open source. Feel free to contribute or report issues.