TCPDF错误:无法在预期位置找到对象(8,0) [英] TCPDF ERROR: Unable to find object (8, 0) at expected location
本文介绍了TCPDF错误:无法在预期位置找到对象(8,0)的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
使用TCPDF&从扫描的pdf删除页面时出现错误. FPDI.其他pdf正常工作.
I am getting an error while deleting a page from an scanned pdf using TCPDF & FPDI. Other pdf are working fine.
ERROR: Unable to find object (8, 0) at expected location
推荐答案
您的文件可能已损坏. 有些扫描仪会产生损坏的PDF, 但在那里没有什么可担心的. 如果您将Linux与shell_exec一起使用,则可以重新创建pdf
Your file might be corrupted. Some scanners will produce corrupted PDF's, But nothing to worry there. You can recreate pdf if you are using 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 recreation has completed,please delete pages . Hope this answer will solve your problems..
这篇关于TCPDF错误:无法在预期位置找到对象(8,0)的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文