PHPackages                             viterbit/liboffice-converter - PHPackages - PHPackages  [Skip to content](#main-content)[PHPackages](/)[Directory](/)[Categories](/categories)[Trending](/trending)[Leaderboard](/leaderboard)[Changelog](/changelog)[Analyze](/analyze)[Collections](/collections)[Log in](/login)[Sign up](/register)

1. [Directory](/)
2. /
3. [PDF &amp; Document Generation](/categories/documents)
4. /
5. viterbit/liboffice-converter

ActiveLibrary[PDF &amp; Document Generation](/categories/documents)

viterbit/liboffice-converter
============================

PHP wrapper over LibreOffice converter

v2.0.0(2y ago)011.6kMITPHPPHP ^8.1

Since Nov 8Pushed 2y ago1 watchersCompare

[ Source](https://github.com/viterbit/libreoffice-converter)[ Packagist](https://packagist.org/packages/viterbit/liboffice-converter)[ Docs](https://github.com/viterbit/liboffice-converter)[ RSS](/packages/viterbit-liboffice-converter/feed)WikiDiscussions master Synced 1mo ago

READMEChangelog (1)Dependencies (8)Versions (5)Used By (0)

PHP wrapper over LibreOffice converter
======================================

[](#php-wrapper-over-libreoffice-converter)

Simple way for documents conversion into various formats.

For example: html -&gt; docx, html -&gt; pdf, docx -&gt; html and many more.

Usage
-----

[](#usage)

```
use Viterbit\LibOfficeConverter\Converter;
use Viterbit\LibOfficeConverter\Parameters;
use Viterbit\LibOfficeConverter\Format;

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

// Describe parameters for converter
$parameters = (new Parameters())
    // 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);
```

Requirements
------------

[](#requirements)

- PHP 7+
- libreoffice-core

Installation
------------

[](#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 viterbit/liboffice-converter
```

Example of installation libreoffice into docker container:

```
FROM php:7.2-fpm

WORKDIR /var/www/html

# Install libreoffice headless
RUN apt update -y \
    && mkdir -p /usr/share/man/man1 \
    && apt -y install default-jdk-headless libreoffice-core libreoffice-writer libreoffice-calc
RUN mkdir -p /var/www/.cache/dconf \
    && mkdir -p /var/www/.config/libreoffice \
    && chmod -R ugo+rwx /var/www/.cache \
    && chmod -R ugo+rwx /var/www/.config
```

Example of installation libreoffice into mac:

```
brew cask install libreoffice

note: bin located at /usr/local/bin/soffice

```

Run tests
---------

[](#run-tests)

```
./vendor/bin/phpunit
```

Contribute
----------

[](#contribute)

First install check tools before commit. Node is required.

```
npm install
```

License
-------

[](#license)

Released under the MIT license

###  Health Score

31

—

LowBetter than 68% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity19

Limited adoption so far

Community7

Small or concentrated contributor base

Maturity65

Established project with proven stability

 Bus Factor1

Top contributor holds 100% of commits — single point of failure

How is this calculated?**Maintenance (25%)** — Last commit recency, latest release date, and issue-to-star ratio. Uses a 2-year decay window.

**Popularity (30%)** — Total and monthly downloads, GitHub stars, and forks. Logarithmic scaling prevents top-heavy scores.

**Community (15%)** — Contributors, dependents, forks, watchers, and maintainers. Measures real ecosystem engagement.

**Maturity (30%)** — Project age, version count, PHP version support, and release stability.

###  Release Activity

Cadence

Every ~337 days

Total

4

Last Release

997d ago

Major Versions

v1.0.2 → v2.0.02023-08-17

PHP version history (3 changes)v1.0.0PHP ^7.2

v1.0.2PHP ^7.4 || ^8.0.0

v2.0.0PHP ^8.1

### Community

Maintainers

![](https://www.gravatar.com/avatar/c6a33e58698c721e8320faec7ff2781101b276c0cb2eaa70619084a1d60ab889?d=identicon)[markitosgv](/maintainers/markitosgv)

---

Top Contributors

[![markitosgv](https://avatars.githubusercontent.com/u/1706470?v=4)](https://github.com/markitosgv "markitosgv (7 commits)")

---

Tags

pdfexcelxlsxlsxconverterworddocxLibreOffice

###  Code Quality

TestsPHPUnit

Static AnalysisPHPStan, Rector

Code StylePHP\_CodeSniffer

Type Coverage Yes

### Embed Badge

![Health badge](/badges/viterbit-liboffice-converter/health.svg)

```
[![Health](https://phpackages.com/badges/viterbit-liboffice-converter/health.svg)](https://phpackages.com/packages/viterbit-liboffice-converter)
```

###  Alternatives

[mnvx/lowrapper

PHP wrapper over LibreOffice converter

129190.5k](/packages/mnvx-lowrapper)[gotenberg/gotenberg-php

A PHP client for interacting with Gotenberg, a developer-friendly API for converting numerous document formats into PDF files, and more!

3685.2M19](/packages/gotenberg-gotenberg-php)[phpoffice/phpspreadsheet

PHPSpreadsheet - Read, Create and Write Spreadsheet documents in PHP - Spreadsheet engine

13.9k293.5M1.2k](/packages/phpoffice-phpspreadsheet)[rap2hpoutre/fast-excel

Fast Excel import/export for Laravel

2.3k24.9M47](/packages/rap2hpoutre-fast-excel)[mk-j/php_xlsxwriter

PHP Library to write XLSX files

1.9k8.1M27](/packages/mk-j-php-xlsxwriter)[anourvalar/office

Generate documents from existing Excel &amp; Word templates | Export tables to Excel (Grids)

24085.2k](/packages/anourvalar-office)

PHPackages © 2026

[Directory](/)[Categories](/categories)[Trending](/trending)[Changelog](/changelog)[Analyze](/analyze)
