gpt4 book ai didi

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

转载 作者:可可西里 更新时间:2023-10-31 22:15:45 26 4
gpt4 key购买 nike

我尝试使用最新版本的 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/

26 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com