php - Fpdf and PDF_LABEL -
i trying set labeling printing system in php , on each label add logo on top of , can't manage work it, because on fpdf images treated cell doesn't work
edit:
the code follows:
for($i=1;$i<=$nolabels;$i++) { $text = sprintf("%s\n%s\n%s\n%s\n%s\n%s\n%s\n%s%s%s", "", "","","", "$destination", "$label", "use by: $date", "$i", '/', "$nolabels"); $pdf->add_label($text);} for($i=1;$i<=$nolabels2;$i++) { $text = sprintf("%s\n%s\n%s\n%s%s%s", "$destination", "$label2", "use by: $date", "$i", '/', "$nolabels2"); $pdf->add_label($text);
you can make additional "addheader" , call on each page. here 1 example using x , y coordinates
public function addheader($pdf, $addpagenum) { // header if ($addpagenum) { $pdf->setfont('arial', '', 10); $pdf->settextcolor(168, 168, 168); $pdf->setxy(20, 265); $pdf->cell(0, 5, __('page') . ' ' . $pdf->pageno() . ' von ' . '{nb}', 0, 1, 'c', 0); } // footer photo $pdf->image(root . '/webroot/img/companylogo.png', 0, 270, 210); }
Comments
Post a Comment