2017 © Pedro PelĂĄez
 

library mpdf

A PHP class to generate PDF files from HTML with Unicode/UTF-8 and CJK support

image

kikusempai/mpdf

A PHP class to generate PDF files from HTML with Unicode/UTF-8 and CJK support

  • Wednesday, May 10, 2017
  • by kikusempai
  • Repository
  • 1 Watchers
  • 0 Stars
  • 1,486 Installations
  • PHP
  • 1 Dependents
  • 0 Suggesters
  • 447 Forks
  • 0 Open issues
  • 28 Versions
  • 2 % Grown

The README.md

mPDF is a PHP class which generates PDF files from UTF-8 encoded HTML. It is based on FPDF and HTML2FPDF (see CREDITS), with a number of enhancements. mPDF was written by Ian Back and is released under the GNU GPL v2 licence., (*1)

Build Status, (*2)

Note: If you are viewing this file on mPDF Github repository homepage or on Packagist, please note that the default repository branch is development which can differ from the last stable release., (*3)

Requirements

mPDF 7.0 requires PHP ^5.6 || ~7.0.0 || ~7.1.0. PHP mbstring and gd extensions have to be loaded., (*4)

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., (*5)

Support us

Consider supporting development of mPDF with a donation of any value. [Donation button][1] can be found on the [main page of the documentation][1]., (*6)

Installation

Official installation method is via composer and its packagist package mpdf/mpdf., (*7)

$ composer require mpdf/mpdf

Usage

The simplest usage of the library would be as follows:, (*8)

<?php

require_once __DIR__ . '/vendor/autoload.php';

$mpdf = new \Mpdf\Mpdf();
$mpdf->WriteHTML('

Hello world!

'); $mpdf->Output();

This will output the PDF inline to the browser as application/pdf Content-type., (*9)

Setup & Configuration

All configuration directives can be set by the $config parameter of the constructor., (*10)

It is recommended to set one's own temporary directory via tempDir configuration variable. The directory must have write permissions (mode 775 is recommended) for users using mPDF (typically cli, webserver, fpm)., (*11)

<?php

$mpdf = new \Mpdf\Mpdf(['tempDir' => __DIR__ . '/tmp']);

By default, the temporary directory will be inside vendor directory and will have correct permissions from post_install composer script., (*12)

For more information about custom temporary directory see the note on Folder for temporary files in the section on Installation & Setup in the [manual][1]., (*13)

If you have problems, please read the section on troubleshooting in the manual., (*14)

Online manual

Online manual is available at https://mpdf.github.io/., (*15)

Contributing

See [CONTRIBUTING.md][2] file in the project., (*16)

Unit Testing

Unit testing for mPDF is done using PHPUnit., (*17)

To get started, run composer install from the command line while in the mPDF root directory (you'll need composer installed first)., (*18)

To execute tests, run vendor/bin/phpunit from the command line while in the mPDF root directory., (*19)

Any assistance writing unit tests for mPDF is greatly appreciated. If you'd like to help, please note that any PHP file located in the /tests/ directory will be autoloaded when unit testing., (*20)

The Versions

10/05 2017

6.1.1.x-dev

6.1.1.9999999-dev http://mpdf.github.io

A PHP class to generate PDF files from HTML with Unicode/UTF-8 and CJK support

  Sources   Download

GPL-2.0

The Requires

 

The Development Requires

by Ian Back

php utf-8 pdf

10/05 2017

v6.1.0.1

6.1.0.1 http://mpdf.github.io

A PHP class to generate PDF files from HTML with Unicode/UTF-8 and CJK support

  Sources   Download

GPL-2.0

The Requires

 

The Development Requires

by Ian Back

php utf-8 pdf

09/05 2017

dev-master

9999999-dev https://mpdf.github.io

A PHP class to generate PDF files from HTML with Unicode/UTF-8 and CJK support

  Sources   Download

GPL-2.0

The Requires

 

The Development Requires

by Ian Back

php utf-8 pdf

09/05 2017

v7.0.0.2

7.0.0.2 https://mpdf.github.io

A PHP class to generate PDF files from HTML with Unicode/UTF-8 and CJK support

  Sources   Download

GPL-2.0

The Requires

 

The Development Requires

by Ian Back

php utf-8 pdf

09/05 2017

dev-development

dev-development https://mpdf.github.io

A PHP class to generate PDF files from HTML with Unicode/UTF-8 and CJK support

  Sources   Download

GPL-2.0

The Requires

 

The Development Requires

by Ian Back

php utf-8 pdf

08/05 2017

v7.0.0-beta3

7.0.0.0-beta3 https://mpdf.github.io

A PHP class to generate PDF files from HTML with Unicode/UTF-8 and CJK support

  Sources   Download

GPL-2.0

The Requires

 

The Development Requires

by Ian Back

php utf-8 pdf

08/05 2017

v7.0.0.1

7.0.0.1 https://mpdf.github.io

A PHP class to generate PDF files from HTML with Unicode/UTF-8 and CJK support

  Sources   Download

GPL-2.0

The Requires

 

The Development Requires

by Ian Back

php utf-8 pdf

23/03 2017

dev-test

dev-test https://mpdf.github.io

A PHP class to generate PDF files from HTML with Unicode/UTF-8 and CJK support

  Sources   Download

GPL-2.0

The Requires

 

The Development Requires

by Ian Back

php utf-8 pdf

12/03 2017

v7.0.0-beta2

7.0.0.0-beta2 https://mpdf.github.io

A PHP class to generate PDF files from HTML with Unicode/UTF-8 and CJK support

  Sources   Download

GPL-2.0

The Requires

 

The Development Requires

by Ian Back

php utf-8 pdf

09/03 2017

dev-barcode-hide-numbers

dev-barcode-hide-numbers http://mpdf.github.io

A PHP class to generate PDF files from HTML with Unicode/UTF-8 and CJK support

  Sources   Download

GPL-2.0

The Requires

 

The Development Requires

by Ian Back

php utf-8 pdf

08/03 2017

v7.0.0-beta1

7.0.0.0-beta1 http://mpdf.github.io

A PHP class to generate PDF files from HTML with Unicode/UTF-8 and CJK support

  Sources   Download

GPL-2.0

The Requires

 

The Development Requires

by Ian Back

php utf-8 pdf

12/12 2016

v6.1.3

6.1.3.0 http://mpdf.github.io

A PHP class to generate PDF files from HTML with Unicode/UTF-8 and CJK support

  Sources   Download

GPL-2.0

The Requires

 

The Development Requires

by Ian Back

php utf-8 pdf

25/08 2016

v6.1.2a

6.1.2.0-alpha http://mpdf.github.io

A PHP class to generate PDF files from HTML with Unicode/UTF-8 and CJK support

  Sources   Download

GPL-2.0

The Requires

 

The Development Requires

by Ian Back

php utf-8 pdf

20/07 2016

v6.1.2

6.1.2.0 http://mpdf.github.io

A PHP class to generate PDF files from HTML with Unicode/UTF-8 and CJK support

  Sources   Download

GPL-2.0

The Requires

 

The Development Requires

by Ian Back

php utf-8 pdf

10/05 2016

6.1.x-dev

6.1.9999999.9999999-dev http://mpdf.github.io

A PHP class to generate PDF files from HTML with Unicode/UTF-8 and CJK support

  Sources   Download

GPL-2.0

The Requires

 

The Development Requires

by Ian Back

php utf-8 pdf

28/04 2016

v6.1.1

6.1.1.0 http://mpdf.github.io

A PHP class to generate PDF files from HTML with Unicode/UTF-8 and CJK support

  Sources   Download

GPL-2.0

The Requires

 

The Development Requires

by Ian Back

php utf-8 pdf

26/04 2016

v6.1.0

6.1.0.0 http://mpdf.github.io

A PHP class to generate PDF files from HTML with Unicode/UTF-8 and CJK support

  Sources   Download

GPL-2.0

The Requires

 

The Development Requires

by Ian Back

php utf-8 pdf

01/03 2015

v6.0.0

6.0.0.0 http://www.mpdf1.com/mpdf/index.php

A PHP class to generate PDF files from HTML with Unicode/UTF-8 and CJK support

  Sources   Download

GPL-1.0+

The Requires

  • php >=4.3.10
  • ext-mbstring *

 

by Ian Back

php utf-8 pdf

17/12 2014

v5.7.4a

5.7.4.0-alpha http://www.mpdf1.com/mpdf/index.php

A PHP class to generate PDF files from HTML with Unicode/UTF-8 and CJK support

  Sources   Download

GPL-1.0+

The Requires

  • php >=4.3.10
  • ext-mbstring *

 

by Ian Back

php utf-8 pdf

14/12 2014

v5.7.4

5.7.4.0 http://www.mpdf1.com/mpdf/index.php

A PHP class to generate PDF files from HTML with Unicode/UTF-8 and CJK support

  Sources   Download

GPL-1.0+

The Requires

  • php >=4.3.10
  • ext-mbstring *

 

by Ian Back

php utf-8 pdf

22/09 2014

v5.7.3a

5.7.3.0-alpha http://www.mpdf1.com/mpdf/index.php

A PHP class to generate PDF files from HTML with Unicode/UTF-8 and CJK support

  Sources   Download

GPL-1.0+

The Requires

  • php >=4.3.10
  • ext-mbstring *

 

by Ian Back

php utf-8 pdf

24/08 2014

v5.7.3

5.7.3.0 http://www.mpdf1.com/mpdf/index.php

A PHP class to generate PDF files from HTML with Unicode/UTF-8 and CJK support

  Sources   Download

GPL-1.0+

The Requires

  • php >=4.3.10
  • ext-mbstring *

 

by Ian Back

php utf-8 pdf

16/05 2014

v5.7.2

5.7.2.0 http://www.mpdf1.com/mpdf/index.php

A PHP class to generate PDF files from HTML with Unicode/UTF-8 and CJK support

  Sources   Download

GPL-1.0+

The Requires

  • php >=4.3.10
  • ext-mbstring *

 

by Ian Back

php utf-8 pdf

07/01 2014

v6.0-beta

6.0.0.0-beta http://www.mpdf1.com/mpdf/index.php

A PHP class to generate PDF files from HTML with Unicode/UTF-8 and CJK support

  Sources   Download

GPL-1.0+

The Requires

  • php >=4.3.10
  • ext-mbstring *

 

by Ian Back

php utf-8 pdf

02/09 2013

v5.7.1

5.7.1.0 http://www.mpdf1.com/mpdf/index.php

A PHP class to generate PDF files from HTML with Unicode/UTF-8 and CJK support

  Sources   Download

GPL-1.0+

The Requires

  • php >=4.3.10

 

by Ian Back

php utf-8 pdf

18/07 2013

v5.7.0

5.7.0.0 http://www.mpdf1.com/mpdf/index.php

A PHP class to generate PDF files from HTML with Unicode/UTF-8 and CJK support

  Sources   Download

GPL-1.0+

The Requires

  • php >=4.3.10

 

by Ian Back

php utf-8 pdf

26/01 2013

v5.6.1

5.6.1.0 http://www.mpdf1.com/mpdf/index.php

A PHP class to generate PDF files from HTML with Unicode/UTF-8 and CJK support

  Sources   Download

GPL-1.0+

The Requires

  • php >=4.3.10

 

by Ian Back

php utf-8 pdf

20/11 2012

v5.5.1

5.5.1.0 http://www.mpdf1.com/mpdf/index.php

A PHP class to generate PDF files from HTML with Unicode/UTF-8 and CJK support

  Sources   Download

GPL-1.0+

The Requires

  • php >=4.3.10

 

by Ian Back

php utf-8 pdf