ManuX
unread,Jan 12, 2012, 9:17:08 AM1/12/12Sign in to reply to author
Sign in to forward
You do not have permission to delete messages in this group
Either email addresses are anonymous for this group or you need the view member email addresses permission to view the original message
to dompdf
Hi guys!, I'm having problem with header image, I set it and after
render is placed in the right position of the page,but ONLY in last
page... I don't understand why.
I tried creating distinct objectes and ways for create it but always I
get The logo just in last page.
Note: If you see the code, the footer is setted too and it work
perfectly, placed in all pages.
Thanks in Advance!
$html .= '<script type="text/php">
$font = "arial";
//Header
$body = $pdf->open_object();
$x = 25;
$y = 20;
$img_w = 147;
$img_h = 48;
$pdf->image("./css/images/logo.gif", "gif", $x, $y, $img_w,
$img_h);
//Footer
$pdf->page_text(680, 550, "Page: {PAGE_NUM} of {PAGE_COUNT}", $font,
8, array(0,0,0));
$pdf->close_object();
$pdf->add_object($body,"all");
</script>';
$dompdf = new DOMPDF();
$dompdf->set_paper('a4', 'landscape');
$dompdf->load_html($html);
$dompdf->render();