Usually when you generate a pdf file using Fpdf, you’re getting error if the image is not exist. To solve the problem you can use @getimagesize to check if a resource actually is an image.

Example

$p = $data[‘photo’];

if (@getimagesize($p)){
//image exist
} else {
//image does not exist
}

Leave a Reply

Your email address will not be published. Required fields are marked *

Name *
Email *
Website

Unable to load the Are You a Human PlayThru™. Please contact the site owner to report the problem.