Re: TCPDF line breaks
| From: | Paul M Foster | Date: | Wed, 23 Dec 2009 03:10:09 +0000 |
| Subject: | Re: TCPDF line breaks | ||
| References: | 1 | Groups: | php.general |
| Request: | Send a blank email to php-general+get-300639@lists.php.net to get a copy of this message | ||
On Wed, Dec 23, 2009 at 10:40:51AM +0900, Dave M G wrote:
> PHP Users,
>
> Anyone using TCPDF? I find that their own forums are near dead.
>
> I want to accomplish something simple, but their documentation is far
> from easy.
>
> I have a PDF where I place text in various places around the page, like so:
>
> $pdf->SetXY(50, 187);
> $pdf->Write(0, "hello world");
>
> However, in the case of really long text, the text spreads out to the
> width of the page, which can break the formatting.
>
> All I want to do is be able to constrain the width of the text being
> written, ideally by number of characters, so that it will have line
> breaks and form a column of text no wider than I want.
>
> Is that possible with TCPDF?
>
> Any advice would be much appreciated.
In FPDF, I find I have to do $pdf->MultiCell() to accomplish this,
rather simply $pdf->Write() (it's kinda like a textarea in HTML).
There's probably something comparable in TCPDF.
Paul
--
Paul M. Foster