Skip to content
PHP wrapper over LibreOffice converter
PHP
Branch: master
Clone or download
mnvx Merge pull request #9 from AndreyNegrov/master
fix annotation for input and output parameters
Latest commit 8e3fbf7 Aug 22, 2018
Permalink
Type Name Latest commit message Commit time
Failed to load latest commit information.
examples readme Jan 23, 2017
src rollback of the last two commits Aug 22, 2018
tests php 5.5 support, travis Jan 23, 2017
.gitignore init Jan 18, 2017
.travis.yml php 5.5 support, travis Jan 23, 2017
LICENSE Create LICENSE Sep 8, 2017
README.md LibreOffice install Nov 23, 2017
composer.json php 5.5 support Jan 23, 2017
phpunit.xml init Jan 18, 2017

README.md

Master Status: Build Status

PHP wrapper over LibreOffice converter

Simple way for documents conversion into various formats.

For example: html -> docx, html -> pdf, docx -> html and many more.

Formats

Usage

use Mnvx\Lowrapper\Converter;
use Mnvx\Lowrapper\LowrapperParameters;
use Mnvx\Lowrapper\Format;

// Create converter
$converter = new Converter();

// Describe parameters for converter
$parameters = (new LowrapperParameters())
    // HTML document
    ->setInputFile('test.html')
    // Format of result document is docx
    ->setOutputFormat(Format::TEXT_DOCX)
    // Result file name
    ->setOutputFile('path-to-result-docx.docx');

// Run converter
$converter->convert($parameters);

More examples

Requirements

  • PHP 5.5+
  • libreoffice-core

Installation

sudo add-apt-repository ppa:libreoffice/ppa
sudo apt-get update
sudo apt-get install default-jdk -y
sudo apt-get install python-software-properties  -y
sudo apt-get install software-properties-common -y
sudo apt-get install libreoffice-core --no-install-recommends
sudo apt-get install libreoffice-writer
composer require mnvx/lowrapper

License

Released under the MIT license

You can’t perform that action at this time.