as you know, HTML2PDF (for PHP 5.x) is based on TCPDF.
HTML2PDF handles HTML better than TCPDF, and HTML2PDF can use CSS classes and have some more cool features, especially for dynamic content that TCPDF does not handle by itself. think of it as "TCPDF ++"
Download HTML2PDF or go to their website and see examples, they will show you better than me.
set_time_limit() , , look @ .