1
我正在使用PHP庫TCPDF。使用MultiCell方法和對齊選項時,我遇到了一個小問題。該段的最後一行證明了(我認爲它應該做到這一點),但只有幾句話留下了很大的空間。這些是我創建的動態表單,因此需要MultiCell(而不是文本或寫入)。段落最後一行的TCPDF調整問題
有誰知道是否有辦法防止這種情況發生,但仍然能夠使用MultiCell方法?過去我使用writeHTML來處理奇怪的問題,並希望儘可能避免。
這裏的代碼產生結果的樣本:
$text = 'This is an example paragraph with no other meaning than to show what is currently happening with this justification issue. I really hope there is a way to keep the ';
$text .= 'justification, yet keep the last sentence from doing so and looking silly. Thank you all for your help and time, it is much appreciated.';
$this->_pdf->MultiCell(0, 0, $text, 0, 'J', false, 1);
非常感謝您的寶貴時間。