Código:
Saludos!! function ReadMetaTags($html) { //! @return void //! @desc Pass meta tag info to PDF file properties $regexp = '/ (\\w+?)=([^\\s>"]+)/si'; // changes anykey=anyvalue to anykey="anyvalue" (only do this when this happens inside tags) $html = preg_replace($regexp," \$1=\"\$2\"",$html); $regexp = '/<meta .*?(name|content)="(.*?)" .*?(name|content)="(.*?)".*?>/si'; preg_match_all($regexp,$html,$aux); $firstattr = $aux[1]; $secondattr = $aux[3]; for( $i = 0 ; $i < count($aux[0]) ; $i++) { $name = ( strtoupper($firstattr[$i]) == "NAME" )? strtoupper($aux[2][$i]) : strtoupper($aux[4][$i]); $content = ( strtoupper($firstattr[$i]) == "CONTENT" )? $aux[2][$i] : $aux[4][$i]; switch($name) { case "KEYWORDS": $this->SetKeywords($content); break; case "AUTHOR": $this->SetAuthor($content); break; case "DESCRIPTION": $this->SetSubject($content); break; } } //Comercial do Aplicativo usado (no caso um script): $this->SetCreator("HTML2FPDF >> http://html2fpdf.sf.net"); }