I need to handle images in TCPDF
I get this error.. Imagemagick is installed, but how do I tell TCPDF the path to imagemagick?
TCPDF ERROR: TCPDF requires the Imagick or GD extension to handle PNG images with alpha channel.
Just try by installing missing GD extension before you do anything else.
PHP 5
sudo apt-get install php5-gd
PHP 7.1
sudo apt install php7.1-gd
PHP 7.2
sudo apt install php7.2-gd
PHP 7.3
sudo apt install php7.3-gd
And then Restart Apache/NGINX
#Apcahe
sudo service apache2 restart
#NGINX
service nginx restart
You need to enable the GD or ImageMagick extensions for PHP (either one or the other will do). If you choose ImageMagick you need to make sure you have the packages installed.
Edit your php.ini file to enable the extension. On Windows:
extension=php_imagick.dll
or
extension=php_gd2.dll
On Unix/Linux:
extension=imagick.so
or make sure you have PHP compiled with the --with-gd option or install the php5-gd package. (For some distributions it may be called something like php54w-gd)
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With