增强表格兼容性
This commit is contained in:
parent
bc77a761df
commit
c7d5138e5c
|
@ -163,17 +163,17 @@ class MetadataPDF extends PDF_Unicode
|
||||||
|
|
||||||
function DrawTable($text)
|
function DrawTable($text)
|
||||||
{
|
{
|
||||||
$table=explode("{|\n",$text);
|
$table=explode("{|",$text);
|
||||||
$this->write(5,$table[0]);
|
$this->write(5,$table[0]);
|
||||||
$table1=explode("|}\n",$table[1]);
|
$table1=explode("|}",$table[1]);
|
||||||
$table=explode("|-\n",$table1[0]);
|
$table=explode("|-",$table1[0]);
|
||||||
$header=explode("!",str_replace(array("\r\n", "\n", "\r"),'',$table[0]));
|
$header=explode("!",str_replace(array("\r\n", "\n", "\r"),'',$table[0]));
|
||||||
$data=array();
|
$data=array();
|
||||||
foreach($table as $line=>$tr)
|
foreach($table as $line=>$tr)
|
||||||
{
|
{
|
||||||
if ($line>0 && !empty($tr))
|
if ($line>0 && !empty($tr))
|
||||||
{
|
{
|
||||||
$tr=substr($tr,1);
|
$tr=substr(trim($tr),1);
|
||||||
$data[]=explode("||",$tr);
|
$data[]=explode("||",$tr);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue