Pavel Kocábek
Pavel Kocábek

Reputation: 83

TCPDF MultiCell with first line indent

I'd like to print some text in a MultiCell, where all lines but the first one would be indented.

I want to achieve something like this:

I want to achieve something like this:

This is what I have so far: $this->tcpdf->MultiCell(WIDTH, 0, $myText, "", "L");

Thanks for your suggestions!

Upvotes: 1

Views: 3710

Answers (2)

Franz Unger
Franz Unger

Reputation: 41

You can use text-indent with a negative value:

$this->tcpdf->writeHTML('<p style="text-indent: -10px>foo<p>');

Upvotes: 4

ArrowHead
ArrowHead

Reputation: 609

There is no inbuilt method to do that, TCPDF offers the usual methods of justifying text which are left, right,center, justify, and default and other methods for vertical alignment.

Take a look at Multicell TCPDF

You can try writing a custom extention for your needs.

Upvotes: 1

Related Questions