简体   繁体   中英

Fillable form values missing after pdf merge in php

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.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM