1) Install TCPDF.
2) Copy the download code and save as TCPDF_CellfitText.php in the same directory that TCPDF.php is located.
3) When creating a new TCPDF object, refer to the object TCPDF_CellFitText rather than TCPDF.
e.g. $pdf = new TCPDF_CellFitText('P', 'mm', 'A4', true, 'UTF-8', false);
The object TCPDF_CellFitText extends the object TCPDF, All the existing TCPDF functionality will be available as well as the new CellFitText method.
4) That's it! Good luck.