Your file may be corrupted. Some scanners will create corrupted PDF files, but there is nothing to worry about. You can recreate PDF if you use linux with shell_exec
function pdf_recreate($f)
{
rename($f,str_replace('.pdf','_.pdf',$f));
$fileArray=array(str_replace('.pdf','_.pdf',$f));
$outputName=$f;
$cmd = "gs -q -dNOPAUSE -dBATCH -sDEVICE=pdfwrite -sOutputFile=$outputName ";
foreach($fileArray as $file)
{
$cmd .= $file." ";
}
$result = shell_exec($cmd);
unlink(str_replace('.pdf','_.pdf',$f));
}
After resting, delete the pages. Hope this answer solves your problems.
source
share