php – PDF不合并大于使用mPDF的PDF-1.5版本

前端之家收集整理的这篇文章主要介绍了php – PDF不合并大于使用mPDF的PDF-1.5版本前端之家小编觉得挺不错的,现在分享给大家,也给大家做个参考。
我尝试使用mPDF插件与最新版本合并pdf,但是
错误来了
PDF合并时使用pdf版本1.3但未完成1.5

我已经尝试下面的代码

<?PHP
$mihir='<html>
<body>
  Generate PDFs with merge
</body>
</html>';    

require_once("MPDF/mpdf.PHP");
$mpdf=new mPDF(); 
$mpdf->SetDisplayMode('fullpage');
$mpdf->list_indent_first_level = 0; 
$mpdf->WriteHTML($mihir);

$mpdf->AddPage();
$mpdf->SetImportUse();
$pagecount = $mpdf->SetSourceFile("order_form_instructions_energy_supply.pdf");
$tplId = $mpdf->ImportPage($pagecount);
$mpdf->UseTemplate($tplId);
$mpdf->Output('test.pdf','D');
?>

我收到这个错误

mPDF错误:无法找到xref表 – 也许是auto_detect_line_endings的问题

提前致谢

RAX:
你尝试过不同的pdf文件吗?这可能会帮助您:
http://www.vankouteren.eu/blog/2009/07/fpdf-error-unable-to-find-xref-table/

One of the PDFs which should be merged was originally created from Word by a PDF creator which placed its signature in the properties of the PDF document. After removing this signature (in this case opening the PDF with Adobe Illustrator and saving it again) the problem was solved.

原文链接:https://www.f2er.com/php/132113.html

猜你在找的PHP相关文章