How can the line spacing be adjusted in FPDF?

To adjust the line spacing in FPDF, you can use the SetLineSpacing method provided by the library. This method allows you to set the distance between lines of text in your PDF document. By calling SetLineSpacing with a specific value, you can increase or decrease the line spacing as needed.

// Set line spacing to 1.5 times the font size
$pdf->SetLineSpacing(15);

// Output text with adjusted line spacing
$pdf->Cell(0, 10, 'This is a sample text with adjusted line spacing', 0, 1);