https://github.com/mnvx/unoconv-laravel
https://github.com/mnvx/unoconv-laravel
Last synced: about 1 year ago
JSON representation
- Host: GitHub
- URL: https://github.com/mnvx/unoconv-laravel
- Owner: mnvx
- License: mit
- Created: 2017-01-15T21:42:44.000Z (over 9 years ago)
- Default Branch: master
- Last Pushed: 2017-01-15T22:09:02.000Z (over 9 years ago)
- Last Synced: 2025-03-23T19:48:27.439Z (over 1 year ago)
- Language: PHP
- Size: 3.91 KB
- Stars: 1
- Watchers: 1
- Forks: 1
- Open Issues: 1
-
Metadata Files:
- Readme: README.md
- License: LICENSE.md
Awesome Lists containing this project
README
# Laravel Unoconv for Laravel 5
Simple way for documents conversion into various formats.
For example: html -> docx, html -> pdf, docx -> html and many more.
## Usage
Using service provider:
```
use Illuminate\Support\Facades\App;
use Mnvx\Unoconv\ConverterInterface;
use Mnvx\Unoconv\Format;
use Mnvx\Unoconv\UnoconvParameters;
$converter = App::make(ConverterInterface::class);
$parameters = (new UnoconvParameters())
->setInputStream('test text')
->setOutputFormat(Format::FORMAT_TEXT_HTML);
echo $converter->convert($parameters);
```
Using facade:
```
use Mnvx\Unoconv\Format;
use Mnvx\Unoconv\UnoconvParameters;
use Mnvx\UnoconvLaravel\Facades\Converter;
$parameters = (new UnoconvParameters())
->setInputStream('test text')
->setOutputFormat(Format::FORMAT_TEXT_HTML);
echo Converter::convert($parameters);
```
## Installation
```
composer require mnvx/unoconv-laravel
```
More about [PHP wrapper over Unoconv](https://github.com/mnvx/unoconv)