I know using the following code, we can check if the file is a PDF or Not.Is there a way in PHP to check if the PDF is a fillable PDF
or a Normal PDF.
$finfo = finfo_open(FILEINFO_MIME_TYPE);
foreach (glob("path/to/files") as $filename) {
if(finfo_file($finfo, $filename) === 'application/pdf') {
echo "'{$filename}' is a PDF" . PHP_EOL;
} else {
echo "'{$filename}' is not a PDF" . PHP_EOL;
}
}
finfo_close($finfo);