It's difficult to tell what is being asked here. This question is ambiguous, vague, incomplete, overly broad, or rhetorical and cannot be reasonably answered in its current form. For help clarifying this question so that it can be reopened, visit the help center
7年前关闭。
我是用Html2pdf创建的Pdf,我不知道如何保存和检索Pdf,我是php新手,请帮助我
提前谢谢

最佳答案

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');
?>

编辑:
用这个你可以保存在服务器上。
  $html2pdf->Output('directory/filename_xxxx.pdf', 'F');
  Add the name to mysqldb.

当您需要pdf内容时,您将从db获得名称并制作所需的内容:)

关于php - 使用Html2pdf创建了Pdf,我不知道如何保存和检索pdf ,我们在Stack Overflow上找到一个类似的问题:https://stackoverflow.com/questions/9443043/

10-12 14:02