Here is a solution:
function drawTextBox($strText, $w, $h, $align='L', $valign='T', $border=true)
{
$xi=$this->GetX();
$yi=$this->GetY();
$hrow=$this->FontSize;
$textrows=$this->drawRows($w,$hrow,$strText,0,$align,0,0,0);
$maxrows=floor($h/$this->FontSize);
$rows=min($textrows,$maxrows);
$dy=0;
if (strtoupper($valign)=='M')
$dy=($h-$rows*$this->FontSize)/2;
if (strtoupper($valign)=='B')
$dy=$h-$rows*$this->FontSize;
$this->SetY($yi+$dy);
$this->SetX($xi);
$this->drawRows($w,$hrow,$strText,0,$align,false,$rows,1);
if ($border)
$this->Rect($xi,$yi,$w,$h);
}
source: https://github.com/lsolesen/fpdf/blob/master/examples/textbox/textbox.php
There is also an addon for that: http://fpdf.de/downloads/addons/52/