PHPackages                             chromeheadlessiox/php-clientx - 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. chromeheadlessiox/php-clientx

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

chromeheadlessiox/php-clientx
=============================

An Open Source PHP client to use cloud export service chromeheadless.io

00PHP

Since Apr 7Pushed 1y ago1 watchersCompare

[ Source](https://github.com/RyszardJaklewicz/composer-psr4-test.php)[ Packagist](https://packagist.org/packages/chromeheadlessiox/php-clientx)[ RSS](/packages/chromeheadlessiox-php-clientx/feed)WikiDiscussions main Synced 1mo ago

READMEChangelogDependenciesVersions (1)Used By (0)

ChromeHeadless.io - The PDF Generator Cloud Service
===================================================

[](#chromeheadlessio---the-pdf-generator-cloud-service)

### Focus on your application, save your time &amp; server resources by off-loading the heavy PDF generation tasks to us. ChromeHeadless.io will deliver the beautiful and error-free PDFs for your professional customer's invoice, data reports and more..

[](#focus-on-your-application-save-your-time--server-resources-by-off-loading-the-heavy-pdf-generation-tasks-to-us-chromeheadlessio-will-deliver-the-beautiful-and-error-free-pdfs-for-your-professional-customers-invoice-data-reports-and-more)

How it works?
-------------

[](#how-it-works)

Our service is provided through REST APIs so virtually it can be used with any language and system. For convenience, we are constructing the client library for each of languages such as PHP. NodeJs, .Net and Python. So if you are using those languages, you may install the client library and provide it with your secret token created from your registered account. The client library will compress your HTML together with resources such as CSS and Javascript and send over to our server farms to generate PDF version. The high definition PDF will be sent back to you.

Advantages
----------

[](#advantages)

There are number of advantages of using our system:

1. **No installation required:** You do not have to install PhantomJS or Headless Chrome.
2. **Off-load heavy task:** Headless Chrome or PhantomJS required certain amount of CPUs and RAM which you may reserve for other crucial tasks. Beside your CPUs and RAM may not be optimized for this tasks which may affect the efficiency. Our system contains a farm of servers which is highly optimized so we can perform this tasks faster and better.
3. **Avoid complicated interface:** You may avoid unnecessarily complicated coding to control headless browser.
4. **Everything works smoothly:** We will take care to make sure that your PDFs generated nicely,all fonts are working so that you can spend more time concentrate on your application rather than be bugged with Headless Chrome issues.

### Our advantages over other similar PDF cloud services

[](#our-advantages-over-other-similar-pdf-cloud-services)

We have studied well other services before we decided to move on with our services, here are some of our advantages over them:

1. Some of them do not execute Javascript, only converting pure HTML to PDF but **WE DO**!
2. Many of them require your application to be online so that resources can be loaded. If your application is in localhost or intranet their solution will not work but **WE DO**!

Get Token Key
-------------

[](#get-token-key)

Token key is a **secret string** with 64 characters used to access our service. You need to attach your token in every request you make to our service.

**Steps to generate token key:**

1. If you have account with us, go to step 2 otherwise [sign-up](https://chromeheadless.io/#signup) with us. An email with title *"Welcome to ChromeHeadless.io"* will be sent to you in few minutes after your sign up.
2. Use account credential in welcome email to [log in](https://chromeheadless.io/login) our system.
3. Go to [tokens management](https://chromeheadless.io/account/tokens) page
4. Hit `Generate` button to generate token key.

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

[](#installation)

The **PHP Client** can be installed through composer

```
composer require chromeheadlessiox/php-client
```

Example
-------

[](#example)

```
