i'm using tcpdf generate pdf. have no idea reset starting page number. mean, generate report starting page numer 3 (not 1) in footer, second page increment 2 (3,5,6,7 etc)
here code :
$_session["hal"] = $_post["hal"]; $_session["f"] = $_post["f"]; class mypdf extends tcpdf { // page footer public function footer() { // position @ 25 mm bottom $this->sety(-25); // set font $this->setfont('helvetica', 'b', 8); // page number $this->cell(0, 15,$_session["f"]." ". $_session["hal"], 't', false, 'r', 0, '', 0, false, 't', 'm'); $_session["hal"]++; } }
can please..
done..
$_session["hal"] = $_post["hal"]; $_session["f"] = $_post["f"];
class mypdf extends tcpdf {
// page footer public function footer() { // position @ 25 mm bottom $this->sety(-25); // set font $this->setfont('helvetica', 'b', 8); // page number //i add var store current page $halaman = $this->pageno(); $this->cell(0, 15,$_session["f"]." ". ($halaman+$_session["hal"]), 't', false, 'r', 0, '', 0, false, 't', 'm'); }
}