思いつきですが、
関数MultiCellについて、
(1) 引数のテキストをmb_splitにより、行単位に分割する。
(2) 行をmb_substrにより、一行あたりの表示可能文字数に分割する。
(3) 分割した文字列を関数Cellにより表示する。
というようにすれば良いような気もしますが。
3/29追記
data/module/fpdi/japanese.php 関数 SJISMultiCellにて、
$wmax=($w-2*$this->cMargin)*1000/$this->FontSize;
の記述があり、たぶん、1行あたりの文字数を計算していると思います。
ここで、*1000の意味が?です。
$wは、表示範囲でのポイント数であり、
$this->FontSizeは、文字のポイント数であると思います。
したがって、*1000をする必要があるのでしょうか。
function SJISMultiCell($w, $h, $txt, $border=0, $align='L', $fill=false)
{
// Output text with automatic or explicit line breaks
$cw=&$this->CurrentFont['cw'];
if($w==0)
$w=$this->w-$this->rMargin-$this->x;
// $wmax=($w-2*$this->cMargin)*1000/$this->FontSize;
$wmax=floor(($w-2*$this->cMargin)/$this->FontSize);
$s=str_replace("\r",'',$txt);
$b=0;
if($border)
{
if($border==1)
{
$border='LTRB';
$b='LRT';
$b2='LR';
}
else
{
$b2='';
if(is_int(strpos($border,'L')))
$b2.='L';
if(is_int(strpos($border,'R')))
$b2.='R';
$b=is_int(strpos($border,'T')) ? $b2.'T' : $b2;
}
}
// changed
$txt_lines = mb_split('\n', $s);
foreach ($txt_lines as $txt_line) {
$txt_line_length = mb_strlen($txt_line);
if ($txt_line_length != 0) {
$txt_count = ceil($txt_line_length/$wmax); // 行数
for ($i=0; $i<$txt_count; $i++) {
$txt_target = mb_substr($txt_line, $i * $wmax, $wmax);
if ($i == 0) { // 開始行
$this->Cell($w,$h,$txt_target,$b,2,$align,$fill);
} elseif ($i == ($txt_count - 1)) { // 終了行
if($border && is_int(strpos($border,'B')))
$b.='B';
$this->Cell($w,$h,$txt_target,$b,2,$align,$fill);
} else {
$this->Cell($w,$h,$txt_target,$b2,2,$align,$fill);
}
}
} else { // 空行
if($border && is_int(strpos($border,'B')))
$b.='B';
$this->Cell($w,$h,$txt_line,$b,2,$align,$fill);
}
}
// changed
$this->x=$this->lMargin;
}