I have a certain long text that I would like to add to FPDF, I am using MultiCell() to achieve this and it works well. The only problem I face is that the text goes almost to the end of the right side of the page. I do not want this to happen, instead, I want multicell to add a line break and continue in the next line. How can I manually specify MultiCell to add line break? Can I provide a limit of with x-axis or characters per line limit?
<?php
header('Content-Type: text/html; charset=utf-8');
require_once __DIR__ . '/vendor/autoload.php';
require_once('FPDI/autoload.php');
require_once('fpdf/fpdf.php');
require_once('FPDI/Fpdi.php');
$pdf = new FPDI();
$pdf->AddPage();
$pdf->setSourceFile('Literature.pdf');
$tplIdx = $pdf->importPage(1);
$pdf->useTemplate($tplIdx, 0, 0, 297, 420, true);
$pdf->SetTextColor(0, 0, 40);
$Text = "As they rounded a bend in the path that ran beside the river, Lara recognized the silhouette of a fig tree atop a nearby hill. The weather was hot and the days were long. The fig tree was in full leaf, but not yet bearing fruit. Soon Lara spotted other landmarks—an outcropping of limestone beside the path that had a silhouette like a man’s face, a marshy spot beside the river where the waterfowl were easily startled, a tall tree that looked like a man with his arms upraised. They were drawing near to the place where there was an island in the river. The island was a good spot to make camp. They would sleep on the island tonight."
$pdf->SetXY(10, 50);
$pdf->Multicell(0, 8, $Text, 0, 'L', false); //Facing problem here
...
...
?>