how to use imagemagick with tcpdf

clarkk picture clarkk · Aug 20, 2012 · Viewed 17.9k times · Source

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.

Answer

M_R_K picture M_R_K · Sep 12, 2015

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