加入收藏 | 设为首页 | 会员中心 | 我要投稿 李大同 (https://www.lidatong.com.cn/)- 科技、建站、经验、云计算、5G、大数据,站长网!
当前位置: 首页 > 站长学院 > PHP教程 > 正文

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

发布时间:2020-12-13 16:42:40 所属栏目:PHP教程 来源:网络整理
导读:我尝试使用mPDF插件与最新版本合并pdf,但是 错误来了 PDF合并时使用pdf版本1.3但未完成1.5 我已经尝试下面的代码 ?php$mihir='htmlbody Generate PDFs with merge/body/html'; require_once("MPDF/mpdf.php");$mpdf=new mPDF(); $mpdf-SetDisplayMode('fullp
我尝试使用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.

(编辑:李大同)

【声明】本站内容均来自网络,其相关言论仅代表作者个人观点,不代表本站立场。若无意侵犯到您的权利,请及时与联系站长删除相关内容!

    推荐文章
      热点阅读