PHPackages                             lukaswhite/document-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. [Utility &amp; Helpers](/categories/utility)
4. /
5. lukaswhite/document-converter

ActiveLibrary[Utility &amp; Helpers](/categories/utility)

lukaswhite/document-converter
=============================

0.0.1(3y ago)15.2kMITPHP

Since Jul 28Pushed 3y ago1 watchersCompare

[ Source](https://github.com/lukaswhite/Document-Converter)[ Packagist](https://packagist.org/packages/lukaswhite/document-converter)[ RSS](/packages/lukaswhite-document-converter/feed)WikiDiscussions main Synced 4w ago

READMEChangelogDependencies (2)Versions (2)Used By (0)

Document Converter
==================

[](#document-converter)

A PHP wrapper around Libreoffice for converting documents from one format to another.

For example:

- Microsoft Word to PDF
- OpenOffice to Microsoft Word
- PDF to HTML
- ...and many more

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

[](#installation)

> IMPORTANT: You must have Libreoffice installed.

Using composer:

```
composer require lukaswhite/document-converter
```

Usage
-----

[](#usage)

```
use Lukaswhite\DocumentConverter\Converter;

$converter = new Converter('/path/to/document.doc');
$converter->toPDF();
```

All being well, this should create a file named `document.pdf` in the same folder.

To customize the filename:

```
$converter->outputAs('converted')->toPDF();
```

...or the output path:

```
$converter->outputTo('/path/to/converted/files')->toPDF();
```

You can of course combine these:

```
$converter->outputAs('converted')
    ->outputTo('/path/to/converted/files')
    ->toPDF();
```

For other formats:

```
$converter->toFormat('doc');
```

### Return Format

[](#return-format)

The conversion method returns an object that contains information about the conversion:

```
$result = $converter->toPDF();

$result->getFilepath(); // e.g. /path/to/document.pdf
$result->getFilename(); // e.g. document.pdf
$result->getExtension(); // e.g. pdf
```

###  Health Score

23

—

LowBetter than 27% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity19

Limited adoption so far

Community7

Small or concentrated contributor base

Maturity37

Early-stage or recently created project

 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

Unknown

Total

1

Last Release

1380d ago

### Community

Maintainers

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

---

Top Contributors

[![lukaswhite](https://avatars.githubusercontent.com/u/999014?v=4)](https://github.com/lukaswhite "lukaswhite (1 commits)")

###  Code Quality

TestsPHPUnit

### Embed Badge

![Health badge](/badges/lukaswhite-document-converter/health.svg)

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

###  Alternatives

[froiden/laravel-installer

Laravel web installer

10883.9k](/packages/froiden-laravel-installer)

PHPackages © 2026

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