John Kesterton
unread,Jul 11, 2011, 11:16:16 AM7/11/11Sign 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
Good Afternoon,
I am trying to render a header image in dompdf which is working fine.
I would now like to add some text over the image however it always
renders underneath!?!
My code is as follows.....Any suggestions would be greatly apreciated.
<script type="text/php">
if( isset($pdf) ) {
//header and footer
$obj = $pdf->open_object();
//header text
$font = Font_Metrics::get_font("Helvetica");
$fontsize = 10;
$fontcolor = array(0.4,0.4,0.4);
$pdf->page_text($pdf->get_width()-100, $pdf->get_height()-40,
"Page {PAGE_NUM} of {PAGE_COUNT}", $font, $fontsize, $fontcolor);
//header image
$image = './images/reportheader.png';
$points = 3142 * 72 / 96;
$points2 = 229 * 72 / 96;
$pdf->page_text(60, 46, "Title Text", $font, $fontsize, $fontcolor);
$pdf->image($image, 'png', 44, 36,754,54);
$pdf->close_object();
$pdf->add_object($obj, 'all');
}
</script>