Forum


Replies: 7   Views: 265
Tcpdf_parser error: decodefilterflatedecode: invalid code

Posted by tarekas  · 03-07-2024 - 10:55

I am trying to merge pdf, then add text & image to pdf to sign, i am getting this error :

TCPDF_PARSER ERROR: decodeFilterFlateDecode: invalid code

the error is being thrown at this level of my code :
 

  $page_count = $pdf->setSourceFile($tmp_file);
            for ($page_no = 1; $page_no <= $page_count; $page_no++) {
                $pdf->AddPage();
                $template_id = $pdf->importPage($page_no);
                $pdf->useTemplate($template_id);
            }


Is this because the pdf is signed using third party tools?

How can i modify in this case? I need to sign it using TCPDF/TCPDI ..