2017 © Pedro Peláez
 

library php-unoconv

Unoconv PHP, an Object Oriented library for easy file conversion with LibreOffice's unoconv

image

php-unoconv/php-unoconv

Unoconv PHP, an Object Oriented library for easy file conversion with LibreOffice's unoconv

  • Monday, April 23, 2018
  • by romain
  • Repository
  • 7 Watchers
  • 42 Stars
  • 120,994 Installations
  • PHP
  • 2 Dependents
  • 0 Suggesters
  • 14 Forks
  • 3 Open issues
  • 7 Versions
  • 4 % Grown

The README.md

PHP Unoconv

Build Status, (*1)

An Object Oriented library which allow easy to use file conversion with Unoconv., (*2)

Install

The recommended way to install PHP-Unoconv is through composer., (*3)

{
    "require": {
        "php-unoconv/php-unoconv": "~0.2"
    }
}

Documentation

Documentation available at http://php-unoconv.readthedocs.org/, (*4)

API Usage

To instantiate Unoconv driver, the easiest way is :, (*5)

$unoconv = Unoconv\Unoconv::create();

You can customize your driver by passing a Psr\Log\LoggerInterface or configuration options., (*6)

Available options are :, (*7)

  • timeout : the timeout for the underlying process.
  • unoconv.binaries : the path (or an array of paths) for a custom binary.
$unoconv = Unoconv\Unoconv::create(array(
    'timeout'          => 42,
    'unoconv.binaries' => '/opt/local/unoconv/bin/unoconv',
), $logger);

To transcode a file, use the transcode method. For the complete format list supported by unoconv, refer to the unoconv CLI., (*8)

$unoconv->transcode('document.docx', 'pdf', 'document.pdf');

You can optionaly transcode a given page range using the fourth argument :, (*9)

// pages 1 to 14
$unoconv->transcode('document.docx', 'pdf', 'document.pdf', '1-14');

Silex Service Provider

A Silex Service Provider is available, all parameters are optionals :, (*10)

$app = new Silex\Application();
$app->register(new Unoconv\UnoconvServiceProvider(), array(
    'unoconv.configuration' => array(
        'unoconv.binaries' => '/opt/local/unoconv/bin/unoconv',
        'timeout'          => 42,
    ),
    'unoconv.logger'  => $app->share(function () {
        return $app['monolog']; // use Monolog service provider
    }),
));

License

Released under the MIT license, (*11)

Bitdeli Badge, (*12)

The Versions

23/04 2018

dev-SILEX2

dev-SILEX2

Unoconv PHP, an Object Oriented library for easy file conversion with LibreOffice's unoconv

  Sources   Download

MIT

The Requires

 

The Development Requires

unoconv

23/04 2018

4.1.0

4.1.0.0

Unoconv PHP, an Object Oriented library for easy file conversion with LibreOffice's unoconv

  Sources   Download

MIT

The Requires

 

The Development Requires

unoconv

15/08 2013

dev-master

9999999-dev

Unoconv PHP, an Object Oriented library for easy file conversion with LibreOffice's unoconv

  Sources   Download

MIT

The Requires

 

The Development Requires

unoconv

25/06 2013

0.3.0

0.3.0.0

Unoconv PHP, an Object Oriented library for easy file conversion with LibreOffice's unoconv

  Sources   Download

MIT

The Requires

 

The Development Requires

unoconv

26/04 2013

0.2.0

0.2.0.0

Unoconv PHP, an Object Oriented library for easy file conversion with LibreOffice's unoconv

  Sources   Download

MIT

The Requires

 

The Development Requires

unoconv

11/02 2013

0.1.1

0.1.1.0

Unoconv PHP, an Object Oriented library for easy file conversion with LibreOffice's unoconv

  Sources   Download

MIT

The Requires

 

The Development Requires

unoconv

21/12 2012

0.1.0

0.1.0.0

Unoconv PHP, an Object Oriented library for easy file conversion with LibreOffice's unoconv

  Sources   Download

MIT

The Requires

 

The Development Requires