PHPackages                             owly-digital/pdf-api-client - 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. [API Development](/categories/api)
4. /
5. owly-digital/pdf-api-client

ActiveLibrary[API Development](/categories/api)

owly-digital/pdf-api-client
===========================

Client for owly-digital/pdf-api

1.0.0(3y ago)1330PHPPHP &gt;= 7.4

Since Mar 14Pushed 1y ago1 watchersCompare

[ Source](https://github.com/owly-digital/pdf-api-client)[ Packagist](https://packagist.org/packages/owly-digital/pdf-api-client)[ Docs](https://github.com/owly-digital/pdf-api-client)[ RSS](/packages/owly-digital-pdf-api-client/feed)WikiDiscussions master Synced 1mo ago

READMEChangelog (1)Dependencies (2)Versions (2)Used By (0)

 PDF API Client
================

[](#pdf-api-client)

 Working with PDF files in PHP can be a significant challenge. It requires not only the integration of multiple technologies but also the ability to configure the server. To address this, we have developed our own PDF server that handles the most critical operations seamlessly.

Content
-------

[](#content)

- [Setup](#setup)
- [Retrieve Token](#retrieve-token)
- [Initialization](#initialization)
- [Endpoints](#endpoints)
    - [Merge](#merge)
    - [Convert](#convert)
    - [HTML to PDF](#html-to-pdf)

Setup
-----

[](#setup)

Install with [Composer](https://getcomposer.org)

```
composer require owly-digital/pdf-api-client
```

Retrieve Token
--------------

[](#retrieve-token)

You can retrieve token by contacting us at

Initialization
--------------

[](#initialization)

```
use Owly\PdfApiClient\PdfApiClient;

$client = new PdfApiClient('token');
```

Endpoints
---------

[](#endpoints)

List of available endpoints will change over time. You can also suggest new features by [creating issue](https://github.com/owly-digital/pdf-api-client/issues).

### Merge

[](#merge)

```
$pdfFiles = [
  'path/to/1.pdf',
  'path/to/2.pdf',
];

$mergedPdfFile = $client->mergePdfFiles($pdfFiles);

file_put_contents('merged.pdf', $mergedPdfFile);
```

### Convert

[](#convert)

Convert PDF files (also with multiple pages) into various formats.

**Parameters:**

- Formats: `jpg`, `png`, `webp` (default `jpg`)
- Quality: *(detected automatically when omited)*
    - `jpg`: 0 - 100 (default `85`)
    - `png`: 0 - 9 (default `9`)
    - `webp`: (default `80`)
- Resolution (in pixels per inch) (default `600` - suitable for printing)

#### Example

[](#example)

```
$pdfFiles = [
  'path/to/1.pdf',
  'path/to/2.pdf',
];

// Basic conversion with automatically detected quality and printable resolution
$convertedFiles = $client->convertPdfFiles($pdfFiles, 'jpg');

// With custom quality and resolution
$convertedFiles = $client->convertPdfFiles($pdfFiles, 'jpg', 50, 300);

// Conversion to webp with custom resolution (default quality)
$convertedFiles = $client->convertPdfFiles($pdfFiles, 'webp', null, 300);

foreach ($convertedFiles as $name => $file) {
	file_put_contents('/path/' . $name, base64_decode($file));
}
```

#### PDF with multiple pages

[](#pdf-with-multiple-pages)

When PDF with multiple pages passed, to each page is added suffix with page number.

```
Input:
awesomePdfFile.pdf (3 pages)

Output:
awesomePdfFile_0.jpg
awesomePdfFile_1.jpg
awesomePdfFile_2.jpg

```

### HTML to PDF

[](#html-to-pdf)

#### Basic conversion

[](#basic-conversion)

```
$html = "Look At Me, I'm PDF now!";

// $pdf can be directly forwarded for download
$pdf = $client->convertHtmlToPdf($html);

// or with custom filename
$pdf = $client->convertHtmlToPdf($html, 'awesomePdfFile.pdf');
```

#### Advanced conversion

[](#advanced-conversion)

You can customize conversion with [DevTools Protocol Options](https://chromedevtools.github.io/devtools-protocol/tot/Page/#method-printToPDF)

```
// Show footer with page numbers
$options = [
	'displayHeaderFooter' => true,
	'headerTemplate' => '',
	'footerTemplate' => 'Page:  / '
];
$pdf = $client->convertHtmlToPdf($html, null, $options);
```

###  Health Score

25

—

LowBetter than 37% of packages

Maintenance28

Infrequent updates — may be unmaintained

Popularity13

Limited adoption so far

Community7

Small or concentrated contributor base

Maturity45

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

1160d ago

### Community

Maintainers

![](https://www.gravatar.com/avatar/31f0c8da2f6fe90f55927697215e552e3d894447772ea56cfea7f5f3538bb267?d=identicon)[patrik-owly](/maintainers/patrik-owly)

---

Top Contributors

[![patrik-owly](https://avatars.githubusercontent.com/u/71405471?v=4)](https://github.com/patrik-owly "patrik-owly (5 commits)")

---

Tags

apihtml2pdfpdfpdftoimagephpapipdf

### Embed Badge

![Health badge](/badges/owly-digital-pdf-api-client/health.svg)

```
[![Health](https://phpackages.com/badges/owly-digital-pdf-api-client/health.svg)](https://phpackages.com/packages/owly-digital-pdf-api-client)
```

###  Alternatives

[pdfcrowd/pdfcrowd

A client library for the Pdfcrowd API. It lets you convert between HTML, PDF and various image formats

631.1M1](/packages/pdfcrowd-pdfcrowd)[mjaschen/collmex

Collmex PHP SDK

2080.7k](/packages/mjaschen-collmex)

PHPackages © 2026

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