I try to use first time Imagick to convert pdf files to images and it dont work for me. When i try use Imagick with images files, its ok and working fine, problem is with PDF files.
My test php controller:
namespace App\Http\Controllers;
use Illuminate\Http\Request;
use Imagick;
class NewspaperController extends Controller
{
/**
* @throws \ImagickException
*/
public function show()
{
$imgExt = new Imagick();
$imgExt->readImage(public_path('storage/uploads/test.pdf'));
$imgExt->writeImages(public_path('storage/uploads/pdf_image_doc.jpg'), false);
return view('xxx');
}
}
When i open this in browser i get only "ImagickException" simple error.
I working on local, with:
phpinfo():
Can anyone help?
Imagick has a release candidate that fixes this error. We were experiencing the same issue after upgrading to Laravel 8.
The new release candidate was posted on 11/10/2021 (6 days after this post). https://windows.php.net/downloads/pecl/releases/imagick/3.6.0rc1/