Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fatal error: Uncaught Error: Class 'PDFMerger\TCPDI' not found in #52

Open
epanagio opened this issue Mar 9, 2021 · 0 comments
Open

Comments

@epanagio
Copy link

epanagio commented Mar 9, 2021

I have

include 'PDFMerger.php';
use PDFMerger\PDFMerger;
require_once 'PDFMerger.php';

$pdf = new PDFMerger;

$pdf->addPDF('t1.pdf', '1, 3, 4')
->addPDF('t2.pdf', '1-2')
->merge('file', 'out.pdf');

and I receive the following error/warning

Warning: "continue" targeting switch is equivalent to "break". Did you mean to use "continue 2"? in /Users/epanagio/Sites/play2/PDFMerger-master/tcpdf/tcpdf.php on line 17778

Fatal error: Uncaught Error: Class 'PDFMerger\TCPDI' not found in /Users/epanagio/Sites/play2/PDFMerger-master/PDFMerger.php:87 Stack trace: #0 /Users/epanagio/Sites/play2/PDFMerger-master/sample.php(10): PDFMerger\PDFMerger->merge('file', 'out.pdf') #1 {main} thrown in /Users/epanagio/Sites/play2/PDFMerger-master/PDFMerger.php on line 87

Based on another user's entry I modified and added

$fpdi = new TCPDI;

and now I receive:

Fatal error: Uncaught Error: Class 'TCPDI' not found in /Users/epanagio/Sites/play2/PDFMerger-master/sample.php:3 Stack trace: #0 {main} thrown in /Users/epanagio/Sites/play2/PDFMerger-master/sample.php on line 3

The files are stored in:

-rwxrwxrwx@ 1 epanagio staff 5248 Nov 16 2017 PDFMerger.php
-rwxrwxrwx@ 1 epanagio staff 1168 Nov 16 2017 README.md
-rwxrwxrwx@ 1 epanagio staff 558 Nov 16 2017 composer.json
-rwxrwxrwx@ 1 epanagio staff 221 Mar 9 11:49 sample.php
-rwxrwxrwx@ 1 epanagio staff 2213007 Mar 3 21:33 t1.pdf
-rwxrwxrwx@ 1 epanagio staff 2225123 Mar 4 08:23 t2.pdf
drwxrwxrwx@ 19 epanagio staff 608 Nov 16 2017 tcpdf

I changed the permissions to be 777 as a test.

How do I get rid of that fatal error?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant