ERROR: It seems that Html2Pdf dependencies are not installed ... you must install thems with 'composer install'

0

I get this error when I installed the dependencies as it says the composer and even so I still give that error, what else may be happening I leave the code for the submission of the form:

<?php
error_reporting(E_ALL ^ E_NOTICE);
    require ('vendor/autoload.php');
    if(isset($_POST["generar"])){
        //Incluimos la librería
        require_once 'app/lib/pdf/html2pdf-5.2.1/src/Html2Pdf.php';

        //Recogemos el contenido de la vista
        ob_start();
        require_once 'index.php';
        $html=ob_get_clean();

        //Pasamos esa vista a PDF
        //Le indicamos el tipo de hoja y la codificación de caracteres
        $mipdf=new HTML2PDF('P','letter','es','true','UTF-8');

        //Escribimos el contenido en el PDF
        $mipdf->writeHTML($html);

        //Generamos el PDF
        $mipdf->Output('formulario.pdf');
    }
?>
<form action="" method="POST">
    <input type="submit" value="Generar PDF" name="generar"/>
</form>
    
asked by Criss 19.12.2018 в 00:18
source

0 answers