Create pdf with php7

0

Do you know of any way to create pdf from php type fpdf but for php7? or maybe something that generates xls or similar.

I'm looking on the internet and everything is for php 5: _ (

    
asked by Killpe 23.02.2017 в 19:38
source

1 answer

6

You could use MPDF to generate pdf files from a html layout.

This would be an example of its use.

<?php
  require('MPDF57/mpdf.php'); //importas las libreria
$html=' <html>
          <head></head>
          <body>
           <h1>Encabezado en pdf<h1>
          </body>
         </html>
      '//creas una variable y dentro pones tu html
$mpdf=new mPDF('c','A4'); //creas el obj y le das formato al documento
$mpdf->writeHTML($html); //imprimes la variable $html que contiene tu HTML
$mpdf->Output('pruebA.pdf','I');//Salida del documento
?>
    
answered by 23.02.2017 / 20:04
source