在PHP中合并pdf后,可填写的表单值丢失

在PHP中合并pdf后,可填写的表单值丢失

问题描述:

I am merging two pdfs using FPDI extended class like this.

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);
        }
    }
}

When I output the merged file, One pdf with fillable field elements had all the elements vanished like the text and barcode etc on that. The other form however is fine. When I echo the fillable pdf form it works great but after this merge I loose all my data from that.

I would appreciate any pointers on this issue.

我正在使用FPDI扩展类合并两个pdf。 p>

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

当我输出合并文件时,带有可填充字段元素的一个pdf具有所有元素 就像那里的文字和条形码一样消失了。 另一种形式是好的。 当我回复可填写的pdf表单时,它工作得很好但是在这次合并之后我从那里删除了我的所有数据。 p>

我很感激关于这个问题的任何指示。 p> DIV>