LibreOffice OFD UNO Extension
A LibreOffice extension for opening OFD (Open Fixed-layout Document) files in LibreOffice Draw.
Overview
This extension enables OFD support in LibreOffice by converting OFD → SVG. Key features:
- Automatic font mapping (Windows fonts → Linux open-source fonts)
- Font missing warnings
- Read-only mode
- Chinese language support
Project Structure
src/main/java/org/loongoffice/ofd/
├── reader/ # Core filter (OFDImportFilter)
├── converter/ # OFD → SVG converter
├── document/ # Document handling
├── font/ # Font checking utilities
├── util/ # Utilities (MessageBox, TempFileManager, etc.)
└── config/ # Font mapping configuration
Usage
Installation
# Build extension
mvn clean package -DskipTests
# Install to LibreOffice
/usr/bin/unopkg add target/ofd-reader.oxt
Opening OFD Files
After installation, simply open .ofd files in LibreOffice.
Font Mapping Configuration
Font mapping file locations (by priority):
~/.loongoffice/font-mappings.properties/etc/loongoffice/font-mappings.properties- Default configuration in JAR
Documentation
- docs/ - Technical documentation
Tech Stack
- Java 17
- ofdrw 2.3.8 (OFD processing library)
- LibreOffice UNO 24.8.4
- Maven
License
MPL-2.0
Languages
Java
92.2%
Shell
7.8%