问题
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
回答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 :)
来源:https://stackoverflow.com/questions/9443043/created-pdf-using-html2pdf-i-dont-know-how-to-save-and-retrieve-pdf