PHPackages                             analize/mpdf-analize - 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. analize/mpdf-analize

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

analize/mpdf-analize
====================

PHP library generating PDF files from UTF-8 encoded HTML

v1.0.11(12mo ago)0915↓50%GPL-2.0-onlyPHPPHP ^5.6 || ^7.0 || ^8.0CI failing

Since May 17Pushed 12mo ago2 watchersCompare

[ Source](https://github.com/vccloudtec/mpdf-analize)[ Packagist](https://packagist.org/packages/analize/mpdf-analize)[ Docs](https://mpdf.github.io)[ RSS](/packages/analize-mpdf-analize/feed)WikiDiscussions master Synced 1mo ago

READMEChangelog (7)Dependencies (11)Versions (10)Used By (0)

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

It is based on [FPDF](http://www.fpdf.org/) and [HTML2FPDF](http://html2fpdf.sourceforge.net/)(see [CREDITS](CREDITS.txt)), with a number of enhancements. mPDF was written by Ian Back and is released under the [GNU GPL v2 licence](LICENSE.txt).

[![Latest Stable Version](https://camo.githubusercontent.com/ce455006187aa6ef220405b19e11c3bf90497d2390c1a6f1c8137fd0e52449d9/68747470733a2f2f706f7365722e707567782e6f72672f6d7064662f6d7064662f762f737461626c65)](https://packagist.org/packages/mpdf/mpdf)[![Total Downloads](https://camo.githubusercontent.com/02f8c232a4d119c4f84b305d0da8a75f43796c362b7bfd2d1e4b3860b278e375/68747470733a2f2f706f7365722e707567782e6f72672f6d7064662f6d7064662f646f776e6c6f616473)](https://packagist.org/packages/mpdf/mpdf)[![License](https://camo.githubusercontent.com/4a38f2c03b8ac4cfe10de06d5f8a45294c2ae3e222de17d6c51dd1ee1fd2fb18/68747470733a2f2f706f7365722e707567782e6f72672f6d7064662f6d7064662f6c6963656e7365)](https://packagist.org/packages/mpdf/mpdf)

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

Objetivo desse fork foi a remoção da página em branco após o índice que criava segue passo a passo.
---------------------------------------------------------------------------------------------------

[](#objetivo-desse-fork-foi-a-remoção-da-página-em-branco-após-o-índice-que-criava-segue-passo-a-passo)

Adicione o pacote MpdfAnalize para que funcione a modificação:

```
composer require wendel-ulhoa/laravel-mpdf-analize
composer require analize/mpdf-analize

```

```
use Analize\LaravelMpdfAnalize\LaravelMpdfAnalizeWrapper;

/* Criando uma instância da classe LaravelMpdfAnalizeWrapper, biblioteca modificada para que possa retirar a página em branco após os índices. */
$mpdf = new LaravelMpdfAnalizeWrapper();

/* Obtendo a renderização do PDF utilizando o Mpdf e a separação por chuncks para não atingir o limite de backtrack */
$pdf = $mpdf->chunkLoadView('', 'view', [], [], $configs);

/* Remove a página em branco que era adicionada após os índices, (Caso queira que volte a fazer a mesma impressão é só comentar a linha abaixo.). */
$pdf->getMpdf()->deletePage(2, true);

```

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

[](#requirements)

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

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

- `PHP >=5.6 = 7.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 8.2` is supported as of `mPDF v8.1.3`
- `PHP 8.3` is supported as of `mPDF v8.2.1`
- `PHP 8.4` is supported as of `mPDF v8.2.5`

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)

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.

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

[](#support-us)

Consider supporting development of mPDF with a donation of any value. [Donation button](https://mpdf.github.io) can be found on the [main page of the documentation](https://mpdf.github.io).

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

[](#installation)

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

```
$ composer require mpdf/mpdf

```

Usage
=====

[](#usage)

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

```
