rest-full / htmltopdf
Html to pdf converter with html2pdf or Mpdf or Dompdf component embedded.
1.0.0
2024-01-27 08:31 UTC
Requires
- php: >=7.3
- dompdf/dompdf: v2.*
- mpdf/mpdf: v8.*
- rest-full/error: 1.*
- rest-full/filesystem: 1.*
- spipu/html2pdf: v5.*
This package is auto-updated.
Last update: 2024-04-27 12:14:05 UTC
README
About Rest-full Htmltopdf
Rest-full Htmltopdf is a small part of the Rest-Full framework.
You can find the application at: rest-full/app and you can also see the framework skeleton at: rest-full/rest-full.
Installation
- Download Composer or update
composer self-update
. - Run
php composer.phar require rest-full/htmltopdf
or composer installed globallycompser require rest-full/htmltopdf
or composer.json"rest-full/htmltopdf": "1.0.0"
and install or update.
Usage
This Html to PDF
<?php
require_once ROOT . '/vendor/autoload.php';
require_once __DIR__.'/../config/pathServer.php';
use Restfull\Htmltopdf\HtmlToPdf;
$pdf = new HtmlToPdf();
$pdf->validateHTML(
'<html><head><title>teste pdf</title></head><body><h1>Teste executado com sucesso</h1></body></html>'
);
$pdf->gerarPDF(ROOT . '/example/test/example.pdf');
License
The rest-full framework is open-sourced software licensed under the MIT license.