ilovepdf/ilovepdf-php

Uncaught Error: Class 'Ilovepdf\EditpdfTask'

AlexanderBech opened this issue · 4 comments

// installed with composer
use Ilovepdf\Ilovepdf;
use Ilovepdf\EditpdfTask;
use Ilovepdf\Editpdf\TextElement;

gives error:
Fatal error: Uncaught Error: Class 'Ilovepdf\EditpdfTask' not found in ...

Also:
$ilovepdf->newTask('editpdf');

gives error:
Uncaught InvalidArgumentException in .... Ilovepdf\Ilovepdf->newTask('editpdf') #1 {main} thrown in /var/www/public_html/includes/ilovepdf/ilovepdf-php/src/Ilovepdf.php on line 226

I think I found the problem.
Even though my version says 1.1.18 in the composer (which is the latest here on github), all the EditpdfTask class-files don't exist in my ilovepdf-php/src folder. Why is that?

Oh, cause the edittask was not added to version 1.1.18 (from december 2020).
I changed the version in composer to "dev-master" and now the files are there.
Let me know if this is not the right way...

Everything on development branch means it can have issues and have some changes. Use at you own risk.