Warning: file_get_contents(/data/phpspider/zhask/data//catemap/7/elixir/2.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
如何在php fpdf中将p标记转换为换行符_Php_Fpdf - Fatal编程技术网

如何在php fpdf中将p标记转换为换行符

如何在php fpdf中将p标记转换为换行符,php,fpdf,Php,Fpdf,我有以下设置fpdf主体的方法: function PrintChapter($num, $title, $date,$url,$Summery,$file,$byauthor){ $this->AddPage(); $this->SetDate(date("l F d, Y",strtotime($date))); $this->Main_Full_TITLE($title); //$this->Pri

我有以下设置fpdf主体的方法:

function PrintChapter($num, $title, $date,$url,$Summery,$file,$byauthor){
        $this->AddPage();

        $this->SetDate(date("l F d, Y",strtotime($date)));

        $this->Main_Full_TITLE($title);
        //$this->PrintMainTitle("1",$title);
        if($url){
            $this->ChapterImage_H_W($url);
        }else{

            if($Summery){
                $this->y0 = $this->GetY()-13;
            }else{
                $this->y0 = $this->GetY()-30;
            }
        }
        $this->ChapterHead($Summery,$byauthor);
        //$this->ChapterTitle($num,$title);
        $this->ChapterBody($file);

    }

function ChapterBody($file){
        $txt = $file;
        $this->SetFont('Arial','',12);
        $this->MultiCell(92,5,$txt);
        $this->Ln();
        if($this->col==0){
            $this->Line(10, $this->GetY(), 100, $this->GetY());
        } else {
            $this->Line($this->GetX(), $this->GetY(), $this->GetX()+90, $this->GetY());
        }
        $this->Ln();
    }

$pdf->PrintChapter(1,$title,$PostData['post_date'],$url[0],$Summery,$MyContent,@implode(", ",$BYAuthorName));

问题是,我的段落之间没有足够大的行距,看起来根本不像换行符。如何使换行符更清晰,以显示更多的段落格式。

您可以将单个高度传递给该方法。如果未超过任何高度,则使用单元格的最后一个高度。在您的情况下是
5
(定义为调用的第二个参数)

您可以使用这两个参数控制线条高度/换行符的高度