<?php
error_reporting(E_ALL);
ini_set('display_errors', 1);

require_once 'libs/tcpdf/tcpdf.php';
require_once 'libs/phpqrcode/qrlib.php';

$pdf = new TCPDF('P', 'mm', 'A4', true, 'UTF-8', false);
$pdf->AddPage();
$pdf->SetFont('helvetica', '', 12);
$pdf->Cell(0, 10, 'Hello World', 0, 1);
$pdf->Output(__DIR__ . '/test.pdf', 'F');

if (file_exists(__DIR__ . '/test.pdf')) {
    echo "PDF Generated Successfully! <a href='test.pdf'>View PDF</a>";
} else {
    echo "Failed to generate PDF.";
}
?>
