PHPackages                             gdinko/pdfmatrix-sdk - 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. gdinko/pdfmatrix-sdk

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

gdinko/pdfmatrix-sdk
====================

pdfMatrix Laravel SDK

v1.0.0(3y ago)16.4kMITPHPPHP ^7.4|^8.0

Since Oct 3Pushed 3y ago1 watchersCompare

[ Source](https://github.com/gdinko/pdfmatrix-sdk)[ Packagist](https://packagist.org/packages/gdinko/pdfmatrix-sdk)[ Docs](https://github.com/gdinko/pdfmatrix-sdk)[ RSS](/packages/gdinko-pdfmatrix-sdk/feed)WikiDiscussions master Synced 1mo ago

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

pdfMatrix Laravel SDK
=====================

[](#pdfmatrix-laravel-sdk)

[![Latest Version on Packagist](https://camo.githubusercontent.com/a38d447a363ee38c9edd77f2e2a7a130b1e548ef9a38a12de8ff1efec1d0f66c/68747470733a2f2f696d672e736869656c64732e696f2f7061636b61676973742f762f6764696e6b6f2f7064666d61747269782d73646b2e7376673f7374796c653d666c61742d737175617265)](https://packagist.org/packages/gdinko/pdfmatrix-sdk)[![GitHub Tests Action Status](https://camo.githubusercontent.com/4cefbe294f50ccc4328cfc78349e98df8e09570dd4a183b5f4ca95fe1f965711/68747470733a2f2f696d672e736869656c64732e696f2f6769746875622f776f726b666c6f772f7374617475732f6764696e6b6f2f7064666d61747269782d73646b2f72756e2d74657374733f6c6162656c3d7465737473)](https://github.com/gdinko/pdfmatrix-sdk/actions?query=workflow%3Arun-tests+branch%3Amaster)[![GitHub Code Style Action Status](https://camo.githubusercontent.com/d64b6d222e569710427292e6103a79f2e40da375f74f47256dcf7e8d274e7574/68747470733a2f2f696d672e736869656c64732e696f2f6769746875622f776f726b666c6f772f7374617475732f6764696e6b6f2f7064666d61747269782d73646b2f436865636b253230262532306669782532307374796c696e673f6c6162656c3d636f64652532307374796c65)](https://github.com/gdinko/pdfmatrix-sdk/actions?query=workflow%3A%22Check+%26+fix+styling%22+branch%3Amaster)[![Total Downloads](https://camo.githubusercontent.com/c3597bcc543e4a9c7beecfb6e83eb5796722c7428276970786307620e7380699/68747470733a2f2f696d672e736869656c64732e696f2f7061636b61676973742f64742f6764696e6b6f2f7064666d61747269782d73646b2e7376673f7374796c653d666c61742d737175617265)](https://packagist.org/packages/gdinko/pdfmatrix-sdk)

[pdfmatrix.com JSON API Documentation](https://pdfmatrix.com/documentation)

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

[](#installation)

You can install the package via composer:

```
composer require gdinko/pdfmatrix-sdk
```

If you need to export configuration file:

```
php artisan vendor:publish --tag=pdfmatrix-config
```

Configuration
-------------

[](#configuration)

Add this to .env file:

```
PDFMATRIX_API_TOKEN= #Get API token from pdfmatrix.com
```

Usage
-----

[](#usage)

```
use Gdinko\PdfMatrix\Facades\PdfMatrix;

$me = PdfMatrix::me();

dd($me);
```

Methods

```
use Gdinko\PdfMatrix\Facades\PdfMatrix;

//Account information
PdfMatrix::me(): array

//PDF Generation
PdfMatrix::pdf(PdfRequestInterface $request)

//PDF Storage
PdfMatrix::listMyFiles(): array
PdfMatrix::getFile($hash): string
PdfMatrix::deleteFile($id): array
```

Examples
--------

[](#examples)

Get information about pdfmatrix API usage

```
$me = PdfMatrix::me();

dd($me);
```

List my files stored on pdfmatrix.com cloud

```
$response = PdfMatrix::listMyFiles();

dd($response);
```

Generate pdf from url and get JSON response from pdfmatrix.com

```
use Gdinko\PdfMatrix\Facades\PdfMatrix;
use Gdinko\PdfMatrix\Requests\PdfRequest;
use Gdinko\PdfMatrix\Exceptions\PdfMatrixException;
use Gdinko\PdfMatrix\Exceptions\PdfMatrixValidationException;

try {

    $jsonResponse = PdfMatrix::pdf(
        new PdfRequest([
            'url' => 'https://pdfmatrix.com',
        ])
    );

    dd($jsonResponse);

} catch (PdfMatrixException $e) {
    echo $e->getCode() . '';
    echo $e->getMessage() . '';
    print_r($e->getErrors());
} catch (PdfMatrixValidationException $ve) {
    echo $ve->getCode() . '';
    echo $ve->getMessage() . '';
    print_r($ve->getErrors());
}
```

Generate pdf from url and send it for download to the browser

```
use Gdinko\PdfMatrix\Facades\PdfMatrix;
use Gdinko\PdfMatrix\Requests\PdfRequest;
use Gdinko\PdfMatrix\Exceptions\PdfMatrixException;
use Gdinko\PdfMatrix\Exceptions\PdfMatrixValidationException;

try {

    return PdfMatrix::pdf(
        new PdfRequest([
            'url' => 'https://pdfmatrix.com',
            'return' => 'download'
        ])
    );

} catch (PdfMatrixException $e) {
    echo $e->getCode() . '';
    echo $e->getMessage() . '';
    print_r($e->getErrors());
} catch (PdfMatrixValidationException $ve) {
    echo $ve->getCode() . '';
    echo $ve->getMessage() . '';
    print_r($ve->getErrors());
}
```

### Testing

[](#testing)

```
composer test
```

### Changelog

[](#changelog)

Please see [CHANGELOG](CHANGELOG.md) for more information what has changed recently.

Contributing
------------

[](#contributing)

Please see [CONTRIBUTING](CONTRIBUTING.md) for details.

### Security

[](#security)

If you discover any security related issues, please email  instead of using the issue tracker.

Credits
-------

[](#credits)

- [pdfmatrix.com](https://pdfmatrix.com)
- [Dinko Georgiev](https://github.com/gdinko)
- [All Contributors](../../contributors)

License
-------

[](#license)

The MIT License (MIT). Please see [License File](LICENSE.md) for more information.

###  Health Score

27

—

LowBetter than 49% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity19

Limited adoption so far

Community7

Small or concentrated contributor base

Maturity51

Maturing project, gaining track record

 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

1314d ago

### Community

Maintainers

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

---

Top Contributors

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

---

Tags

laravelgdinkopdfmatrixpdfmatrix laravel

###  Code Quality

TestsPest

### Embed Badge

![Health badge](/badges/gdinko-pdfmatrix-sdk/health.svg)

```
[![Health](https://phpackages.com/badges/gdinko-pdfmatrix-sdk/health.svg)](https://phpackages.com/packages/gdinko-pdfmatrix-sdk)
```

###  Alternatives

[maatwebsite/excel

Supercharged Excel exports and imports in Laravel

12.7k144.3M710](/packages/maatwebsite-excel)[barryvdh/laravel-dompdf

A DOMPDF Wrapper for Laravel

7.3k87.6M275](/packages/barryvdh-laravel-dompdf)[barryvdh/laravel-snappy

Snappy PDF/Image for Laravel

2.8k24.8M48](/packages/barryvdh-laravel-snappy)[rap2hpoutre/fast-excel

Fast Excel import/export for Laravel

2.3k24.9M47](/packages/rap2hpoutre-fast-excel)[elibyy/tcpdf-laravel

tcpdf support for Laravel 6, 7, 8, 9, 10, 11

3542.7M5](/packages/elibyy-tcpdf-laravel)[tzsk/sms

A robust and unified SMS gateway integration package for Laravel, supporting multiple providers.

320244.3k6](/packages/tzsk-sms)

PHPackages © 2026

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