php 中的 pdf 合并后缺少可填写的表单值

Fillable form values missing after pdf merge in php

我正在像这样使用 FPDI 扩展 class 合并两个 pdf。

function concat() {
    foreach ($this->files AS $file) {
        $page_count = $this->setSourceFile($file);
        for ($i = 1; $i <= $page_count; $i++) {
            $tplidx = $this->ImportPage($i);
            $s = $this->getTemplatesize($tplidx);
            if (strpos($file, 'test') || strpos($file, 'test_slip')) {
                $this->AddPage('L', array($s['w'], $s['h']));
            } else {
                $this->AddPage($this->DefOrientation, array($s['w'], $s['h']));
            }
            $this->useTemplate($tplidx);
        }
    }
}

当我输出合并后的文件时,一个带有可填写字段元素的 pdf 的所有元素都消失了,比如上面的文本和条形码等。然而,另一种形式很好。当我回显可填写的 pdf 表单时它工作得很好但是在这次合并之后我丢失了我所有的数据。

如有任何关于此问题的指点,我将不胜感激。

FPDI does not support importing of form fields.