[php+mysql:177] dompdf class problem, can't add page number

9 views
Skip to first unread message

shanto sas

unread,
May 18, 2010, 7:58:00 AM5/18/10
to phpex...@yahoogroups.com, ph...@googlegroups.com
I'm using dompdf class for generate class.  http://code.google.com/p/dompdf/

I'm trying to add page number on the pdf. I have try the below code.
but couldn't get the page number at the pdf.
where I'm doing wrong. please suggest me.
<?php
require_once("dompdf_config.
inc.php");

$dompdf = new DOMPDF();

$html = '<html><body>';
$html .='<script type="text/php">
                        $font = Font_Metrics::get_font("verdana", "bold");
                        $dompdf->page_text(200, 16, "{PAGE_NUM} of {PAGE_COUNT}", $font,
10, array(0,0,0)); </script>';
$html .=  '</body></html>';

$dompdf->load_html($html);
$dompdf->render();
$dompdf->stream("sample.pdf");
?>

regards,
saeed


--
You received this message because you are subscribed to the Google Groups "PHP+MySQL Savvy Group".
To post to this group, send email to ph...@googlegroups.com
To unsubscribe , send email to phpbd-un...@googlegroups.com
For more options, visit this group at http://groups.google.com/group/phpbd?hl=en
 
Also suggested group http://groups.google.com/group/phpbook
 
For further information : Lenin +88-019-12-024699
Reply all
Reply to author
Forward
0 new messages