diff --git a/application/models/MetadataPDF.php b/application/models/MetadataPDF.php index aaf955a5..66af1f49 100644 --- a/application/models/MetadataPDF.php +++ b/application/models/MetadataPDF.php @@ -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); } }