Skip to content Skip to sidebar Skip to footer

Created Pdf Using Html2pdf I Don't Know How To Save And Retrieve Pdf

i am created Pdf using Html2pdf ,i don't know how to save and retrieve pdf, i am new in php please help me thanks in advance

Solution 1:

as you can see in example in 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');
?>

EDIT: with this you save on server.

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

When you want pdf content,you will get name from db and make what you need :)

Post a Comment for "Created Pdf Using Html2pdf I Don't Know How To Save And Retrieve Pdf"