How to Wrap Cell's Content in PDF | PHP FPDF Tutorial #7

Описание к видео How to Wrap Cell's Content in PDF | PHP FPDF Tutorial #7

EDIT : I have made a new tutorial about PDF table with cell wrapping abilities using multicell which is more efficient than this one. I recommend you to use that method instead. Please watch it here :    • PDF Table with text wrapping using Mu...  

welcome to the seventh chapter of PHP FPDF tutorial series.
in this chapter, i'm about to demonstrate how to handle overflowing text in PDF cells.
we will utilize and also explain GetStringWidth, SetFontSize and MultiCell method in this tutorial.
this time i'm about to explain two method of text wrapping.
font shrinking and multi cell.
font shrinking handle overflowing text by shrinking the font size until it fits in the cell.
this is the most simple method, this method keeps the height of every row equal.
but the downside is, it's only limited to text which is slightly longer than the cell.
longer than that, the text will become unreadable because it's too small.
compared to font shrinking, multi cell allows longer text without loss of readability.
but it's more complex and require more calculation.

Source code : https://bit.ly/3hYdT0F
More tutorial on this series : https://goo.gl/TNqTN4 (PHP PDF Tutorial Series)

Комментарии

Информация по комментариям в разработке