how to convert p tag to line break in php fpdf


I have the following for setting up the body of my fpdf:

function PrintChapter($num, $title, $date,$url,$Summery,$file,$byauthor){

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


                $this->y0 = $this->GetY()-13;
                $this->y0 = $this->GetY()-30;


function ChapterBody($file){
        $txt = $file;
            $this->Line(10, $this->GetY(), 100, $this->GetY());
        } else {
            $this->Line($this->GetX(), $this->GetY(), $this->GetX()+90, $this->GetY());

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

The problem, is that my paragraphs do not have a big enough line space between and don't look like line breaks at all. How can I make the line breaks more distinct to show more paragraph formatting.




You can pass an individual height to the Ln() method. If nothing is passed the last height of a cell is used. Which is5 in your case (defined as 2nd parameter of the MultiCell() call).

You can control the line height/height of a line break with both parameters.

People are also looking for solutions to the problem: php - Data is not getting stored in database for multiple check box in laravel


Didn't find the answer?

Our community is visited by hundreds of web development professionals every day. Ask your question and get a quick answer for free.

Ask a Question

Write quick answer

Do you know the answer to this question? Write a quick response to it. With your help, we will make our community stronger.

Similar questions

Find the answer in similar questions on our website.