AddPage();
// Add the image to the PDF
$pdf->Image($image, 10, 10, 190);
// Output the PDF as a file
header(‘Content-Type: application/pdf’);
header(‘Content-Disposition: attachment; filename=”converted.pdf”‘);
$pdf->Output();
} else {
echo “File type not supported. Please upload a JPG file.”;
}
?>