2017 © Pedro Peláez
 

library unoconv

Convert documents using unoconv.

image

eboost/unoconv

Convert documents using unoconv.

  • Friday, February 2, 2018
  • by BertvanHoekelen
  • Repository
  • 2 Watchers
  • 1 Stars
  • 96 Installations
  • PHP
  • 0 Dependents
  • 0 Suggesters
  • 1 Forks
  • 0 Open issues
  • 2 Versions
  • 10 % Grown

The README.md

Unoconv Laravel API

A Laravel wrapper for unoconv as a webservice. See Convert for more details., (*1)

Installation

Install this package through Composer., (*2)

Add this to your composer.json dependencies:, (*3)

Using Laravel 5.2+

"require": {
   "eboost/unoconv": "dev-master"
}

Run composer install to download the required files., (*4)

Next you need to add the service provider to config/app.php, (*5)

'providers' => [
    ...
    Eboost\Unoconv\UnoconvServiceProvider::class
]

Set up the facade. Add the reference in config/app.php to your aliases array., (*6)

'aliases'  => [
    ...
    'Unoconv' => Eboost\Unoconv\Facades\Unoconv::class,
]

Publish the config, (*7)

php artisan vendor:publish --provider="Eboost\Unoconv\UnoconvServiceProvider" --tag="config"

Usage

File conversion

# Convert the file to /file.pdf

Unoconv::file('/file.pptx')->to('pdf');
# Convert the file and save it in a different location /new/location/file.pdf

Unoconv::file('/file.pptx')->to('/new/location/file.pdf');

Chaining multiple conversions

# Convert the file to /file.pdf and /file.jpg

Unoconv::file('/file.pptx')->to(['pdf', 'jpg]);
# Convert the file to /file.pdf and /preview/file.jpg

Unoconv::file('/file.pptx')->to(['pdf', '/preview/file.jpg]);

Non-blocking conversion using a queue

To use queues you will need have set-up the default laravel queue listener., (*8)

Unoconv::file('/file.pptx')->queue('pdf');
# You can also specify the queue.

Unoconv::file('/file.pptx')->onQueue('image-converter', 'pdf');

Dispatch new job after conversion is done

Unoconv::file('/file.pptx')->after((new AfterConversionJob()))->to('pdf');

The Versions

02/02 2018

dev-master

9999999-dev https://bitbucket.eboost.nl/projects/EP/repos/unoconv

Convert documents using unoconv.

  Sources   Download

MIT proprietary

The Requires

 

converter documents eboost unoconv

01/11 2016

1.0

1.0.0.0 https://bitbucket.eboost.nl/projects/EP/repos/unoconv

Convert documents using unoconv.

  Sources   Download

proprietary

The Requires

 

converter documents eboost unoconv