PHPackages                             restpackio/restpack-php - 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. [HTTP &amp; Networking](/categories/http)
4. /
5. restpackio/restpack-php

ActiveLibrary[HTTP &amp; Networking](/categories/http)

restpackio/restpack-php
=======================

Restpack.io PHP client for HTML to PDF API, and Screenshot API

1.1.0(5y ago)1103.0k↓31.9%4[2 PRs](https://github.com/restpackio/restpack-php/pulls)MITPHP

Since Apr 12Pushed 3y ago2 watchersCompare

[ Source](https://github.com/restpackio/restpack-php)[ Packagist](https://packagist.org/packages/restpackio/restpack-php)[ RSS](/packages/restpackio-restpack-php/feed)WikiDiscussions master Synced 1mo ago

READMEChangelogDependencies (1)Versions (7)Used By (0)

reastpack-php
=============

[](#reastpack-php)

Official PHP client for Restpack APIs

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

[](#installation)

Requires PHP 5.6.

The recommended way to install restpack-php is through [Composer](https://getcomposer.org):

First, install Composer:

```
$ curl -sS https://getcomposer.org/installer | php

```

Next, install the latest restpack-php:

```
$ php composer.phar require restpackio/restpack-php

```

Finally, you need to require the library in your PHP application:

```
require "vendor/autoload.php";
```

Screenshot API
--------------

[](#screenshot-api)

For detailed documentation, please visit [Screenshot API v6 Reference page](https://restpack.io/screenshot/docs).

```
$screenshot = new Restpack\Screenshot("");

// Capture given URL. Return the document details and CDN url of the Image
$screenshot->capture("http://google.com", [ "format" => "png" /* , other options */ ])

// Capture given html content. Return the document details and CDN url of the Image
$screenshot->captureHTML("Bold text etc", [ "format" => "png" /* , other options */ ])

// Capture given URL. Return the image file as Buffer
$screenshot->captureToImage("http://google.com", [ "format" => "png" /* , other options */ ])

// Capture given html content. Return the image file as Buffer
$screenshot->captureHTMLToImage("Bold text etc", [ "format" => "png" /* , other options */ ])
```

HTML To PDF API
---------------

[](#html-to-pdf-api)

For detailed documentation, please visit [HTML to PDF API v5 Reference page](https://restpack.io/html2pdf/docs).

```
$htmlpdf = new Restpack\HTMLToPDF("");

// Convert given URL to PDF. Return the document details and CDN url of PDF
$htmlpdf->convert("http://google.com", [ "pdf_page" => "A4" /* , other options */ ])

// Convert given html content to PDF. Return the document details and CDN url of PDF
$htmlpdf->convertHTML("Bold text etc", [ "pdf_page" => "A4" /* , other options */ ])

// Convert given URL to PDF. Return the PDF document as Buffer
$htmlpdf->convertToPDF("http://google.com", [ "pdf_page" => "A4" /* , other options */ ])

// Convert given html content to PDF. Return the PDF document as Buffer
$htmlpdf->convertHTMLToPDF("Bold text etc", [ "pdf_page" => "A4" /* , other options */ ])
```

###  Health Score

37

—

LowBetter than 83% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity35

Limited adoption so far

Community12

Small or concentrated contributor base

Maturity67

Established project with proven stability

 Bus Factor1

Top contributor holds 57.1% 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 ~371 days

Total

4

Last Release

1845d ago

### Community

Maintainers

![](https://www.gravatar.com/avatar/708351ddf1bcc3f3021f6155fc996aaffdd0e432fcc5781d44cb560337d55c83?d=identicon)[restpackio](/maintainers/restpackio)

---

Top Contributors

[![namirali](https://avatars.githubusercontent.com/u/3964626?v=4)](https://github.com/namirali "namirali (4 commits)")[![eknkc](https://avatars.githubusercontent.com/u/1248453?v=4)](https://github.com/eknkc "eknkc (3 commits)")

---

Tags

html2pdfrestpackscreenshotapipdfrestconvertcsshtmlsvgpngscreenshotenterprisehtml2pdf

### Embed Badge

![Health badge](/badges/restpackio-restpack-php/health.svg)

```
[![Health](https://phpackages.com/badges/restpackio-restpack-php/health.svg)](https://phpackages.com/packages/restpackio-restpack-php)
```

###  Alternatives

[xeroapi/xero-php-oauth2

Xero official PHP SDK for oAuth2 generated with OpenAPI spec 3

1054.3M14](/packages/xeroapi-xero-php-oauth2)[aspose-cloud/aspose-words-cloud

Open, generate, edit, split, merge, compare and convert Word documents. Integrate Cloud API into your solutions to manipulate documents. Convert PDF to Word (DOC, DOCX, ODT, RTF and HTML) and in the opposite direction.

32157.4k](/packages/aspose-cloud-aspose-words-cloud)[qaamgo/onlineconvert-api-sdk

Sdk for using the Online Convert Api version 2

3975.4k](/packages/qaamgo-onlineconvert-api-sdk)[zenditplatform/zendit-php-sdk

PHP client for Zendit API

1204.3k](/packages/zenditplatform-zendit-php-sdk)[whatarmy/fedex-rest

New FedEx Rest API wrapper

2440.5k1](/packages/whatarmy-fedex-rest)[ory/hydra-client-php

Documentation for all of Ory Hydra's APIs.

1710.8k](/packages/ory-hydra-client-php)

PHPackages © 2026

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