Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Multiline Text Using TCPDF?

Tags:

php

pdf

tcpdf

I'm trying to generate PDFs which contain multi line text areas, non HTML. Using the Text() method puts everything on one line, using MultiCell() works, but it adds thick black lines around each 'cell' no matter what I set the border setting to. Any suggestions?

like image 843
jbrain Avatar asked Jun 11 '26 17:06

jbrain


1 Answers

as per documentation over here you have to set $border = 0. So, imho if you will write something like following, you will achieve what you desire:

$pdf->AddPage();
$txt = 'Lorem ipsum dolor sit amet, consectetur adipisicing elit.. aliqua.';
$pdf->MultiCell(55, 5, $txt, 0, '', 0, 1, '', '', true);
$pdf->lastPage();
$pdf->Output('example.pdf', 'I');

If this doesn't help then post your code so that we can help you further..

like image 187
000 Avatar answered Jun 14 '26 06:06

000



Donate For Us

If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!