リンクされたブロックが 2 つあるという問題があります。最大文字数になると(縮小して収まる前に)、次のリンクされたブロックに移動します。問題は、次のブロックに大量のテキストがプッシュされると、非常に小さくなることです。すべての文字を均等に各ボックスに分割する方法はありますか? 縮んでも大丈夫、同じように見えればいいんです。以下の例の画像とコード:
http://i.imgur.com/ytadphF.png
public function addTextToMultiBlock($text,$baseBlockName,$numberOfBlocks)
{
$tf = 0;
for ($i = 1; $i <= $numberOfBlocks; $i++)
{
$optlist ="encoding=unicode textflowhandle=" . $tf;
$tf = $this->p->fill_textblock($this->page, $baseBlockName.$i, $text, $optlist);
//Set text to null ( $tf handle holds extra text from now on )
$text = null;
if ($tf == 0) {
trigger_error("Warning: " . $this->p->get_errmsg() . "\n");
break;
}
$reason = (int) $this->p->info_textflow($tf, "returnreason");
$result = $this->p->get_parameter("string", $reason);
//Break if all text is placed
if ($result == "_stop")
{
$this->p->delete_textflow($tf);
break;
}
}
}
//call below to block
if(!empty($this->orderData->remarks))
{
$addRemarks.= $this->orderData->remarks;
$helper->addTextToMultiBlock($this->orderData->remarks, 'info', 2);
}
else
{
//nothing
}