What steps should be taken to resolve the "Class 'FPDF' not found" error when using FPDI?

To resolve the "Class 'FPDF' not found" error when using FPDI, you need to include the FPDF library before including the FPDI library in your PHP script. This error occurs because FPDI relies on the FPDF library for its functionality.

require_once('fpdf181/fpdf.php');
require_once('fpdi/fpdi.php');

// Your FPDI code here