PHPackages                             chartpdf/chartpdf - 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. chartpdf/chartpdf

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

chartpdf/chartpdf
=================

Chart pdf lib

v0.0.6(4y ago)2552↑100%MITPHPPHP &gt;=7.2.5

Since Nov 19Pushed 4y ago2 watchersCompare

[ Source](https://github.com/webmailcontatos/mpdf_chart)[ Packagist](https://packagist.org/packages/chartpdf/chartpdf)[ RSS](/packages/chartpdf-chartpdf/feed)WikiDiscussions main Synced 1mo ago

READMEChangelogDependencies (4)Versions (8)Used By (0)

Chart PDF is a PHP library which generates PDF files from UTF-8 encoded HTML.

It is based on [MPDF](https://github.com/mpdf/mpdf)

> ⚠ If you are viewing this file on Chart PDF GitHub repository homepage or on Packagist, please note that the default repository branch is `dev` which can differ from the last stable release.

Requirements
============

[](#requirements)

PHP versions and extensions
---------------------------

[](#php-versions-and-extensions)

- `mPDF >=7.0` is supported on `PHP ^5.6 || ~7.0.0 || ~7.1.0 || ~7.2.0`
- `PHP 7.3` is supported since `mPDF v7.1.7`
- `PHP 7.4` is supported since `mPDF v8.0.4`
- `PHP 8.0` is supported since `mPDF v8.0.10`
- `PHP 8.1` is supported as of `mPDF v8.0.13`

PHP `mbstring` and `gd` extensions have to be loaded.

Additional extensions may be required for some advanced features such as `zlib` for compression of output and embedded resources such as fonts, `bcmath` for generating barcodes or `xml` for character set conversion and SVG handling.

Known server caveats
--------------------

[](#known-server-caveats)

Chart PDF has some problems with fetching external HTTP resources with single threaded servers such as `php -S`. A proper server such as nginx (php-fpm) or Apache is recommended.

Support us
==========

[](#support-us)

Consider supporting development of Chart PDF with a donation of any value. [Donation](https://www.paypal.com/donate/?business=R8MH6WYWJTJBY&no_recurring=0&currency_code=USD)

Installation
============

[](#installation)

Official installation method is via composer and its packagist package [chart\_pdf/chart\_pdf](https://packagist.org/packages/chart_pdf/chart_pdf).

```
$ composer require chartpdf/chartpdf

```

Usage
=====

[](#usage)

The simplest usage (since version 7.0) of the library would be as follows:

```
