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

标签 php mpdf

我尝试使用最新版本的 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 错误:无法找到外部参照表 - 可能是 auto_detect_line_endings 的问题

提前致谢

最佳答案

雷克斯: 您是否尝试过使用不同的 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.

关于php - PDF 不合并大于 PDF-1.5 版本使用 mPDF,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/38763280/

相关文章:

php - MPDF div 在表内不起作用

php - 从带有外键的表中获取值

php - 更改 PHP 中 RAND() 函数的种子?

php - 使用 .p8 和 PHP 发送推送

php - 第 11008 行警告 : Invalid argument supplied for foreach() in mpdf. php

php - 带有 MPDF 的 PDF 页面周围的边框

php - 如果 isset $_POST

php - 使用 xampp (php) 使 aptana 项目文件夹可运行

html - 不要破坏 div 中的内容

pdf - mpdf 从另一个 pdf 文档导入所有页面