Forum


Replies: 7   Views: 455
Tcpdf_parser error: decodefilterflatedecode: invalid code
Topic closed:
Please note this is an old forum thread. Information in this post may be out-to-date and/or erroneous.
Every phpdocx version includes new features and improvements. Previously unsupported features may have been added to newer releases, or past issues may have been corrected.
We encourage you to download the current phpdocx version and check the Documentation available.

Posted by tarekas  · 11-07-2024 - 12:13

    public function merge_to_pdf($params)
    {
        $allowed_extensions = ['doc', 'docx', 'pdf'];
        $documents          = $params['documents'];
        $module             = $params['module'];

        $core_path = substr(COREPATH, 0, -12);
        require_once $core_path . '/application/libraries/phpdocx-premium-14-ns/Classes/Phpdocx/Create/CreateDocx.php';
        require_once $core_path . '/application/libraries/phpdocx-premium-14-ns/Classes/Phpdocx/Libs/TCPDF_lib.php';

        $module_attachments_folder_path = $this->get_module_container_path($module) . DIRECTORY_SEPARATOR;
        $module_tmp_folder_path         = $this->ci->config->item('files_path') . DIRECTORY_SEPARATOR . 'tmp' . DIRECTORY_SEPARATOR;
        $module_folder                  = $this->get_module_properties($module, 'container');
        if (is_dir($module_tmp_folder_path . $module_folder)) {
            $module_tmp_folder_path = $module_tmp_folder_path . $module_folder . DIRECTORY_SEPARATOR;
        }
        $pdf = new TCPDI();


I am trying to upgrade phpdocx to 14, I am encountering : undefined function TCPDI 
how should i call it?