Рет қаралды 19,184
MultiCell can be used when we are not sure about the length of the string we are going to use inside the cell. MultiCell can wrap the string and add more lines based on the requirement.
www.plus2net.c...
We can write one equal length string inside one Cell() and inside one MultiCell(), based on the length of the string the height of the MultiCell will change / increase.
We can add border to MultiCell by using the option to 1 ( all sides of the border ) or we can specify any combination of border by using Chars ‘LR’ for Left and Right border. Similarly for Top and bottom borders we can specify ‘TB’ , three sides like this ‘LTR’. We can use any combination of Chars to specify the border.
Along with the border we can also align the text in different sides by using L for Left ( default ), R for Right, C for Centre alignment. We can use J for justifying the text inside the MultiCell.
Understanding Height of the MultiCell
Height of the MultiCell increases if the number of lines are increased or the number of text inside the MultiCell goes beyond the
We can read the X and Y position by using GetX() and GetY() and then display the same inside the MultiCell and understand how these values are changing. The vertical drop or the Y value will increase with increase in number of lines inside the MultiCell.
#MultiCell , #pdfmylticell , #FPDFMULTICELL