Important
This is a sub-split, for development, pull requests and issues, visit: https://github.com/row-bloom/row-bloom
composer require row-bloom/mpdf-renderer
use RowBloom\RowBloom\Support;
use RowBloom\MpdfRenderer\MpdfRenderer;
app()->get(Support::class);
->registerInterpolatorDriver(MpdfRenderer::NAME, MpdfRenderer::class)
Requires:
- PHP >= 8.1
- ext-gd
- ext-mbstring
- ext-zlib
use RowBloom\RowBloom\Interpolators\PhpInterpolator;
use RowBloom\MpdfRenderer\MpdfRenderer;
use RowBloom\RowBloom\RowBloom;
use RowBloom\RowBloom\Types\Table;
app()->get(RowBloom::class)
->addTable(Table::fromArray([
['title' => 'Title3', 'body' => 'body3'],
['title' => 'Title4', 'body' => 'body4'],
]))
->setInterpolator(PhpInterpolator::class)
->setTemplate('
<h1><?= $title ?></h1>
<p>Bold text</p>
<div><?= $body ?></div>
')
->setRenderer(MpdfRenderer::class)
->save(__DIR__.'/foo.pdf');
Please see CHANGELOG for more information on what has changed recently.
Please see CONTRIBUTING for details.
The MIT License (MIT). Please see License File for more information.