What are the potential pitfalls of using "\n" or "\r" for line breaks in FPDF with PHP?

Using "\n" or "\r" for line breaks in FPDF with PHP can lead to issues with the formatting of the PDF document, as FPDF requires the use of the MultiCell() function to properly handle line breaks. To solve this issue, you should use the MultiCell() function instead of manually inserting line breaks with "\n" or "\r".

<?php
require('fpdf.php');

$pdf = new FPDF();
$pdf->AddPage();
$pdf->SetFont('Arial','B',16);
$pdf->MultiCell(0,10,'This is a sample text with line breaks using FPDF MultiCell function.');
$pdf->Output();
?>