i'm using google project api convert html pdf. works great , amazing. can here if want: http://code.google.com/p/dompdf/
my question follows, plugin it's magic , obtain this:
file_put_contents("nameofpdf.pdf", $pdf);
how go saving server? i'm new saving info server, please detail bit.
thanks.
more of code here
$dompdf = new dompdf(); $dompdf->load_html($html); $dompdf->set_paper( "a4" , "portrait"); $dompdf->render(); $dompdf->stream("xxxxx.pdf", array("attachment" => false)); $pdf = $dompdf->output(); // can write $pdf disk, store in database or stream // client. file_put_contents("xxxxx.pdf", $pdf);
if read docs correctly, need remove line:
$dompdf->stream("xxxxx.pdf", array("attachment" => false));
it save disk without output.
to specify path, add show file name in file_put_contents
call.
Comments
Post a Comment