Forum


Replies: 8   Views: 3510
Fatal error: cannot redeclare class fpdf joomla 3
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 dev-info  · 23-06-2020 - 07:54

Thank you for your reply.

$ docx = new Phpdocx \ Create \ CreateDocx ();
$ docx-> addText ('Ceci est un test');
$ docx-> createDocx ('C: \ wamp64 \ Sample');

that works well, but when I want to use the pdf merge, it can't find it:


public static function test_merge () {
    require_once JPATH_LIBRARIES. '/phpdocx/Classes/Phpdocx/Create/CreateDocx.php';

    if (!file_exists('C:\wamp64\test3.pdf')) {

      $ merge = new MultiMerge ();
      $ merge-> mergePdf(array ('C:\wamp64\test1.pdf', 'C:\wamp64\test2.pdf'), 'C:\wamp64\test3.pdf');

   }
}

I have this error: Fatal error: Class 'MultiMerge' not found

So the docx document version works well with the namespace version, but not the pdf MultiMerge .
In the classic version of phpdocx (without the namespace) any function but I have the problem of redeclaration of tcpdf.
There I no longer have a problem with class declaration TCPDF, but they cannot find the MultiMerge class

 

Can you help me?

Thank you