A PHP CLI tool for exporting ELO DMS archives to Nextcloud-ready folder structures. Preserves the original ELO folder hierarchy and converts image files to PDF format.
- Extract documents from ELO MDB databases using mdb-json
- Convert image files (TIF, TIFF, JPG, JPEG, PNG, GIF) to PDF using PHP Imagick
- Preserve original ELO folder hierarchy structure
- Copy unsupported file formats as-is
- Support for multi-page TIFF to multi-page PDF conversion
- Sanitize filenames for cross-platform compatibility
- Direct PDF generation without temporary files
- PHP 8.1 or higher
- PHP Extensions:
imagick- For image to PDF conversion
- System packages:
mdbtools- For MDB database access (provides mdb-json command)
# Clone repository
git clone https://github.com/four-bytes/four-elo-dms-export.git
cd four-elo-dms-export
# Install dependencies
composer installInstall MDBTools and PHP Imagick:
# Install MDBTools for MDB database access
sudo apt-get update
sudo apt-get install -y mdbtools
# Install PHP Imagick extension
sudo apt-get install -y php-imagick imagemagick
# Verify MDBTools installation
mdb-json --version
# Verify Imagick installation
php -m | grep imagickInstall MDBTools and Imagick:
- MDBTools: Download from MDBTools releases or use package manager
- Imagick: Download ImageMagick and PHP Imagick extension for your PHP version
# Install using Homebrew
brew install mdbtools imagemagick
brew install php-imagick# Test MDBTools
mdb-json --help
# Test Imagick
php -m | grep imagickBasic export command:
./bin/elo-export export /path/to/DMS.MDB /path/to/Archivdata --output=/path/to/exportdatabase- Path to ELO MDB database file (e.g.,Archivdata/DMS.MDB)files- Path to ELO files directory (e.g.,Archivdata)
--output/-o- Output directory for export (default:./nextcloud-export)
# Export ELO archive to Nextcloud directory
./bin/elo-export export \
/mnt/archive/Archivdata/DMS.MDB \
/mnt/archive/Archivdata \
--output=/home/user/Nextcloud/Documents/ELO-ArchiveThe tool preserves the original ELO folder hierarchy:
export-directory/
├── Invoices/
│ ├── 2024/
│ │ ├── invoice-2024-001.pdf
│ │ └── contract-abc.pdf
│ └── 2025/
│ └── invoice-2025-001.pdf
├── Contracts/
│ └── client-agreement.pdf
└── HR Documents/
└── employee-handbook.pdf
- Folder structure mirrors the original ELO folder hierarchy
- Supported image formats (TIF, JPG, PNG, GIF) are converted to PDF
- Unsupported file formats are copied as-is with original extension
- Filenames are sanitized for cross-platform compatibility
- Duplicate filenames are automatically numbered (file_1.pdf, file_2.pdf, etc.)
The tool works with standard ELO DMS database structure:
- objekte table - Main document objects
- objkeys table - Document metadata and keys
- dochistory table - Document version history
- Files are identified by
objtype > 254andobjtype < 9999(excluding root object) - Deleted documents have
objstatus != 0(excluded from export) - Folder hierarchy built from
objparentreferences - File path format:
Archivdata/DMS_1/UP{(objdoc>>10)<<2 in 6-char hex}/{objdoc in 8-char hex} - Example: objdoc=3101 → folder=(3101>>10)<<2=12 →
Archivdata/DMS_1/UP00000C/00000C1D.TIF
# Install development dependencies
composer install
# Run tests
composer testMIT License - see LICENSE file for details
4 Bytes Email: info@4bytes.de
Contributions are welcome! Please feel free to submit a Pull Request.
For issues and questions, please use the GitHub issue tracker.