This package is for converting office formats to something else. You can generate Thumbnails, PDFs etc..
- LibreOffice for the convertion.
- PHP >= 7.1
You can check the following files:
This package can be installed through Composer.
composer require breadlesscode/office-converter
use \Breadlesscode\Office\Converter;
Converter::file('Test.odt') // select a file for convertion
->setLibreofficeBinaryPath('/usr/bin/libreoffice') // binary to the libreoffice binary
->setTemporaryPath('./temp') // temporary directory for convertion
->setTimeout(100) // libreoffice process timeout
->save(__DIR__.'/lorem.pdf'); // save as pdf
use Breadlesscode\Office\Converter;
Converter::file('./Test.odt')
->save('./lorem', 'jpg');
use Breadlesscode\Office\Converter;
Converter::file('./Test.odt')
->save('./lorem.jpg');
$ composer test
The MIT License (MIT). Please see License File for more information.