-1
我正在使用字符串生成动态多单元。像A,B,C等。我想把那些多单元放在页面上。我需要制作$ pdf-> SetMargins()动态,这意味着它会在内容加载时自动居中。这是我试过的代码,但有些错误。将PDF的内容设置为中心
$pdfWidth = 210;
col = 9; // This is dynamic so it can be any value from 5-20;
$mar = (($pdfWidth + ($col * 8)) /2)/2;
$pdf->SetMargins($mar,0,0);
“* Something * is wrong。”不知何故,你忘了说什么。 – usr2564301