Forum


Replies: 3   Views: 3971
Cannot redeclare class tcpdf
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 therasim  · 28-02-2017 - 12:01

I'm using PHPDocX and Spipu's HTML2PDF library (https://github.com/spipu/html2pdf) together. With PHPDocX I'm not generating any PDF documents; however, I'm getting this error when I try to generate my Word document:

Fatal error: Cannot redeclare class TCPDF in /files/www/html/phpdocx/lib/pdf/tcpdf/tcpdf.php on line 152

Is there a way to bypass this error? Or is there a line I can modify to check if the library was already called?

Thanks in advance for any hints