我正在使用 fpdf 生成 pdf 文件。我想输出一个包含一些列的表。我遇到的问题是我无法将列标签的文本标题从第二个数组包装到第八个数组。超出数组长度的文本不在列标签的视图中。任何建议都会有很大帮助。
这是代码
$header = array(
array("label"=>"Subject Category", "length"=>75, "align"=>"L"),
array("label"=>"Total Pubs", "length"=>15, "align"=>"L"),
array("label"=>"%Pubs in Top 10% SNIP", "length"=>15, "align"=>"L"),
array("label"=>"%Pubs in Top 25% SNIP", "length"=>15, "align"=>"L"),
array("label"=>"Total Cites", "length"=>15, "align"=>"L"),
array("label"=>"%Cites in Top 10% SNIP", "length"=>15, "align"=>"L"),
array("label"=>"%Cites in Top 25% SNIP", "length"=>15, "align"=>"L"),
array("label"=>"4-year H_Index", "length"=>15, "align"=>"L")
);
foreach ($header as $col) {
$pdf->Cell($col['length'],15, $col['label'], 1, '0', $col['align'], true);
}