Word Wrap Certificate Text?

Re: Word Wrap Certificate Text?

by Ross McPherson -
Number of replies: 5
Hi Ken,

Thank you so much for your effort.

I dug around on http://www.fpdf.org/ and found the answer to the centering issue.
I used most of what you gave me and then added a MultiCell.
It wraps and aligns center. I'm very happy with it.

Here is the code I used.

$pdf->SetLeftMargin(60);
$pdf->SetRightMargin(60);

cert_printtext(45, 420, 'C', 'Times', 'B', 26, '');
$pdf->MultiCell(0, 32, utf8_decode($course->fullname), 0 , 'C', 'false');

The 32 is the height of the cells as they are produced.

Thanks again,

Ross
In reply to Ross McPherson

Re: Word Wrap Certificate Text?

by Ken Gibson -

Hey Ross,

Good to see you found it.
Will come in handy down the road for me too.

Ken

In reply to Ken Gibson

Re: Word Wrap Certificate Text?

by Thales Araujo -

OH My GOD!  FANTASTIC!

Ken, thanks a lot for share that tip!

I was several days trying to know how to add more space between lines.

I can wrap the text, but without space between lines...

Thanks a lot man!

Thales

In reply to Thales Araujo

Re: Word Wrap Certificate Text?

by Ken Gibson -

Hey Thales,

No problem - for those not familiar with PDF generation (myself included), the coding is tough.

Ken