PHP - FPDF Multicell function does not make a new line

10,636

Try to use "\n" instead of '\n' (or even PHP_EOL predefined constant). Use double quotes.

Related:

Share:
10,636
Gianluca Ghettini
Author by

Gianluca Ghettini

I'm a software developer.

Updated on June 09, 2022

Comments

  • Gianluca Ghettini
    Gianluca Ghettini almost 2 years

    I'm trying to make a newline inside a multicell. What I've done is:

    $pdf->MultiCell(90,10,'test'.'\n'.'test',1,0,'C',1);
    

    According to the manual the multicell should parse the '\n' character and render a newline but it does not (it prints the two byte string '\n' alongside with the actual text)