增强表格兼容性

This commit is contained in:
wlx 2011-11-04 09:54:15 +00:00
parent bc77a761df
commit c7d5138e5c
1 changed files with 4 additions and 4 deletions

View File

@ -163,17 +163,17 @@ class MetadataPDF extends PDF_Unicode
function DrawTable($text)
{
$table=explode("{|\n",$text);
$table=explode("{|",$text);
$this->write(5,$table[0]);
$table1=explode("|}\n",$table[1]);
$table=explode("|-\n",$table1[0]);
$table1=explode("|}",$table[1]);
$table=explode("|-",$table1[0]);
$header=explode("!",str_replace(array("\r\n", "\n", "\r"),'',$table[0]));
$data=array();
foreach($table as $line=>$tr)
{
if ($line>0 && !empty($tr))
{
$tr=substr($tr,1);
$tr=substr(trim($tr),1);
$data[]=explode("||",$tr);
}
}