2017 © Pedro Peláez
 

library mpdf

image

eadesignro/mpdf

  • Sunday, March 4, 2018
  • by eadesignro
  • Repository
  • 1 Watchers
  • 1 Stars
  • 3,099 Installations
  • PHP
  • 0 Dependents
  • 0 Suggesters
  • 447 Forks
  • 0 Open issues
  • 31 Versions
  • 5 % Grown

The README.md

mPDF is a PHP library which generates PDF files from UTF-8 encoded HTML., (*1)

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

Build Status, (*3)

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

Requirements

mPDF 7+ requires PHP ^5.6 || ~7.0.0 || ~7.1.0 || ~7.2.0 || ~7.3.0. PHP mbstring and gd extensions have to be loaded., (*5)

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

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

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

Installation

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

$ composer require mpdf/mpdf

Usage

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

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

Setup & Configuration

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

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

Warning: mPDF will clean up old temporary files in the temporary directory. Choose a path dedicated to mPDF only., (*14)

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

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

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

Online manual

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

For general questions or troubleshooting please use the mpdf tag at Stack Overflow (and not the project's issue tracker)., (*19)

Contributing

Please read before submitting issues and pull requests the CONTRIBUTING.md file., (*20)

Unit Testing

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

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

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

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

The Versions

04/03 2018

v5.5.0

5.5.0.0

  Sources   Download

04/03 2018

v5.3.0

5.3.0.0

  Sources   Download

04/03 2018

v5.4.0

5.4.0.0

  Sources   Download

10/10 2017

7.0.1.x-dev

7.0.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/10 2017

v7.2.1

7.2.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

02/11 2016

v7.0.1

7.0.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

02/11 2016

dev-development

dev-development 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

13/09 2016

dev-test

dev-test 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

13/09 2016

dev-lint

dev-lint 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/08 2016

dev-travis

dev-travis 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

dev-master

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

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

08/07 2016

dev-barcode-numbers

dev-barcode-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/07 2016

dev-refactor

dev-refactor 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/07 2016

dev-barcode-numbers-pr

dev-barcode-numbers-pr 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

23/06 2016

dev-constructor

dev-constructor 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

10/05 2016

7.0.x-dev

7.0.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

  • ext-mbstring *
  • php >=4.3.10

 

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

  • ext-mbstring *
  • php >=4.3.10

 

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

  • ext-mbstring *
  • php >=4.3.10

 

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

  • ext-mbstring *
  • php >=4.3.10

 

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

  • ext-mbstring *
  • php >=4.3.10

 

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

  • ext-mbstring *
  • php >=4.3.10

 

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

  • ext-mbstring *
  • php >=4.3.10

 

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