rest-full/htmltopdf

Html to pdf converter with html2pdf or Mpdf or Dompdf component embedded.

1.0.0 2024-01-27 08:31 UTC

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 globally compser 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.