How can the issue of "FPDF error: Cannot open" be resolved when trying to open the last PDF file?

The "FPDF error: Cannot open" issue occurs when the PDF file being opened is corrupted or inaccessible. To resolve this issue, you can try re-uploading the PDF file, checking its permissions, or using a different PDF viewer.

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

$pdf = new FPDF();
$pdf->AddPage();
$pdf->SetFont('Arial','B',16);
$pdf->Cell(40,10,'Hello World!');
$pdf->Output('D','example.pdf');
?>