1
私はレポートを生成するのにfpdfを使用していますが、内容が数行長くなる可能性があるため、マルチセルにする必要があるフィールドの1つです。以下はコードです。マルチセルは長さが数行になりますが、それ以外の部分は標準サイズになり、マルチセル後のコンテンツは次の行に表示されます。だから、すべてこの問題fpdfマルチセル制御
$row_height = 5; // set the default
$column_width = 15;
$number_of_lines = ceil($pdf->GetStringWidth($eventMessage)/($column_width - 1));
$cell_height = 5;
$height_of_cell = ceil($number_of_lines * $cell_height);
if ($cell_height > $row_height) {
$row_height = $cell_height;
}
$pdf->Cell(10, $row_height,$count, 1, 0, 'L', true);
$pdf->Cell(15, $row_height,$row['latitude'], 1, 0, 'L', true);
$pdf->Cell(16, $row_height,$row['longitude'], 1, 0, 'L', true);
$pdf->Cell(25, $row_height,$row['dateTimer'], 1, 0, 'L', true);
$pdf->Cell(25, $row_height,$row['insertDateTime'], 1, 0, 'L', true);
$pdf->MultiCell(15, $row_height,$eventMessage, 1, 'J',true);
$pdf->Cell(15, $row_height,$eventSource, 1, 0, 'L', true);
$pdf->Cell(15, $row_height,$eventLocation, 1, 0, 'L', true);
$pdf->Cell(18, $row_height,$row['stat'], 1, 0, 'L', true);
ブラザーを克服するためにどのように、私は同じ問題を下落しているが、私が思うにそれを解決するために、開発者はありません。だから我々は苦しんでいる。 –