Pregunta

Estoy creado PDF usando HTML2PDF, no sé cómo guardar y recuperar PDF, soy nuevo en PHP por favor ayúdame gracias de antemano

¿Fue útil?

Solución

Como puede ver en el ejemplo en html2pdf

<?php
    $content = "
<page>
    <h1>Exemple d'utilisation</h1>
    <br>
    Ceci est un <b>exemple d'utilisation</b>
    de <a href='http://html2pdf.fr/'>HTML2PDF</a>.<br>
</page>";

    require_once(dirname(__FILE__).'/html2pdf/html2pdf.class.php');
    $html2pdf = new HTML2PDF('P','A4','fr');
    $html2pdf->WriteHTML($content); // in $content you put your content to have in pdf
    $html2pdf->Output('exemple.pdf');
?>

Editar: Con esto ahorras en el servidor.

  $html2pdf->Output('directory/filename_xxxx.pdf', 'F');
  Add the name to mysqldb.

Cuando desea contenido PDF, obtendrá el nombre de DB y hará lo que necesita :)

Licenciado bajo: CC-BY-SA con atribución
No afiliado a StackOverflow
scroll top