created Pdf using Html2pdf i don't know how to save and retrieve pdf [closed]

为君一笑 提交于 2019-12-11 04:02:58

问题


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

标签
易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!