Skip to content

Pesc0/ubztopdf

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

7 Commits
 
 
 
 
 
 

Repository files navigation

ubztopdf

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.

Features

  • Converts OpenBoard .ubz files 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

Dependencies

Install the required Python packages:

pip3 install svglib reportlab

Usage

Basic usage

./ubztopdf.py file1.ubz file2.ubz *.ubz

Examples

Convert a single file:

./ubztopdf.py presentation.ubz

Convert multiple files:

./ubztopdf.py lesson1.ubz lesson2.ubz lesson3.ubz

Convert all .ubz files in current directory:

./ubztopdf.py *.ubz

Output

  • PDF files are created in the same directory as the input files
  • Output files have the same name as input files but with .pdf extension
  • Progress and error messages are printed to stderr

Error Handling

The script includes robust error handling for:

  • Invalid file extensions (non-.ubz files)
  • Missing or corrupted SVG files within archives
  • Archive extraction failures
  • SVG parsing errors

License

This project is open source. Feel free to contribute or report issues.

About

Convert OpenBoard .ubz files to pdf

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors

Languages