ilovepdf / ilovepdf-php

iLovePDF Rest Api - PHP Library (https://developer.ilovepdf.com)
146 stars 39 forks source link

Uncaught Error: Class 'Ilovepdf\EditpdfTask' #36

Closed AlexanderBech closed 2 years ago

AlexanderBech commented 2 years ago

// 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 ...

AlexanderBech commented 2 years ago

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

AlexanderBech commented 2 years ago

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?

AlexanderBech commented 2 years ago

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...

maztch commented 2 years ago

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