Hi again!
I try to change the Line-Height of the lines within MultiCell. From the documentation I learned this will be controlled by the height-parameter.
The following look all the same:
Hm, took a look. It seems 3.0.013 didn't cut it for me. And I read the Thread mentioned by Jon. He is right. It is the same issue now. I have some troubles with having the K_CELL_HEIGHT_RATIO defined as a constant without any possibility to override it. I have the issue to change the Line-Height within one PDF-Document so I have to change the value defined in K_CELL_HEIGHT_RATIO during generation.
Now I only have 2 solutions (which both are not very good):
I create the whole documents with just using the Cell-Method. Very inconvenient.
I extend the TCPDF-Class and do implement my 'own' MultiCell-Method (copy/paste) just to change one or two lines. The problem with this is I have to think about that everytime I update the TCPDF-Class and will have to check for the changes between my new implementation and yours.
I think it would be nice to have calculated the cell_height by something like:
OK, done!
The latest TCPDF 3.0.014 contains a new method setCellHeightRatio() to set the value of the new $cell_height_ratio variable that is used instead of K_CELL_HEIGHT_RATIO constant (the default value).
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
Hi again!
I try to change the Line-Height of the lines within MultiCell. From the documentation I learned this will be controlled by the height-parameter.
The following look all the same:
$pdf->MultiCell(0,5,$text,0,'L',0,1);
$pdf->MultiCell(0,15,$text,0,'L',0,1);
$pdf->MultiCell(0,250,$text,0,'L',0,1);
Is this second parameter ignored?
Greets and thanks
red
I think you're having the same problem as me. See this thread:
https://sourceforge.net/forum/forum.php?thread_id=1962139&forum_id=435311
I hope you have better luck than I had. I'm still using TCPDF v2.6 in order to get around it.
... I'm going to fixing it. Please wait...
Hm, took a look. It seems 3.0.013 didn't cut it for me. And I read the Thread mentioned by Jon. He is right. It is the same issue now. I have some troubles with having the K_CELL_HEIGHT_RATIO defined as a constant without any possibility to override it. I have the issue to change the Line-Height within one PDF-Document so I have to change the value defined in K_CELL_HEIGHT_RATIO during generation.
Now I only have 2 solutions (which both are not very good):
I think it would be nice to have calculated the cell_height by something like:
$min_cell_height = $this->FontSize * (!$cell_height_ratio? $cell_height_ratio : K_CELL_HEIGHT_RATIO);
Thanks for your help
red
OK, done!
The latest TCPDF 3.0.014 contains a new method setCellHeightRatio() to set the value of the new $cell_height_ratio variable that is used instead of K_CELL_HEIGHT_RATIO constant (the default value).
Thank you very much! This is what I call fast response!
Great
red
Thanks. Works like a charm!
OK, fixed on TCPDF 3.0.013.
Thanks! I'll take a look this thursday.