Download von der Offiziellen Webseite (https://www.libreoffice.org/download/download/) und Installieren. Unter Windows ist ein neustart des gesamten Servers nötig!
// vor dem ersten Gebrauch von PHPDocx-Klassen:
require_once __DIR__ . '/components/phpdocx/classes/CreateDocx.php';
// Überschreiben der .ini-Direktiven direkt im Config-Array (Offizielle Methode von PHPDocx,
// siehe https://www.phpdocx.com/documentation/cookbook/setting-phpdocx-ini-php-code):
PhpdocxUtilities::$_phpdocxConfig['license']['code'] = 'custom key';
PhpdocxUtilities::$_phpdocxConfig['transform']['method'] = 'libreoffice';
PhpdocxUtilities::$_phpdocxConfig['transform']['path'] = 'D:/LibreOffice/program/soffice.exe -env:UserInstallation=file:///D:/webroot/data/tmp/libreoffice/';
; absolute path to the temp dir. If empty the default system tmp directory will be used
temp_path = "D:/webroot/data/tmp/libreoffice"
; libreoffice or openoffice
method = "libreoffice"
; libreoffice installation path, absolute path
path = "D:/LibreOffice/program/soffice.exe -env:UserInstallation=file:///D:/webroot/data/tmp/libreoffice/"
Der IIS User (IIS AppPool\DefaultAppPool) muss Read & Write Berechtigungen auf dem temp_path / UserInstallation Ordner haben.