Last updated on May 31st, 2022 at 12:04 pm

FPDF is an open source library for generating PDF files using php. This is one of the best tool available for report generation. Sometimes we will encounter this error When we try to view the PDF file to see an invoice or report. The program displays an error message saying “FPDF error: Alpha channel not supported

Fix for this error

1. Open the PNG file in a graphics program
2. Save as a JPG format and close the file
3. Reopen the new JPG file in the graphics program
4. Save as a PNG file again
5. Reattach the new PNG file

OR

1. Open the PNG file in a graphics program
2. Save as a JPG format and close the file
3. Change the line in your code that define your logo from

$pdf->Image('mylogo.png',80,8,33); 

TO

$pdf->Image('mylogo.jpg',80,8,33);

You will also be interested in this Tutorial, Export MySql database table to pdf using php (with logo)

Leave a Reply

Your email address will not be published. Required fields are marked *