Welcome toVigges Developer Community-Open, Learning,Share
Welcome To Ask or Share your Answers For Others

Categories

0 votes
681 views
in Technique[技术] by (71.8m points)

php - FPDF can't center element in footer

I tried making a 3 columns footer. Didn't work out. Does someone know why please ?

class PDF extends FPDF
{


// Page footer
function Footer()
{
    global $shop_footer;
    global $date;
    //global $adress_shop;
    // Position at 1.5 cm from bottom
    $this->SetY(280);
    // Arial italic 8
    $this->SetFont('Philosopher','I',8);
    $this->Cell(0,10, $shop_footer[2],0,0,'L');
    $this->Cell(0,10,'Page '.$shop_footer[1],0,0,'C');
    $this->Cell(0,10, $shop_footer[0].' - '.$date['year'].'/'.$date['mon'].'/'.$date['mday'],0,0,'R');
}
}

enter image description here

The problem in this image is the 'Page 1' on the left. It's supposed to be in the center of the Footer but somehow it went to the right and merged with the element on the right...


与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
Welcome To Ask or Share your Answers For Others

1 Answer

0 votes
by (71.8m points)
等待大神答复

与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
Welcome to Vigges Developer Community for programmer and developer-Open, Learning and Share

2.1m questions

2.1m answers

63 comments

56.5k users

...