html2ps / fpdf image quality

You may notice some image issues when using the PHP library html2ps / html2pdf (from ) or when using some versions of the FPDF library. JPEG quality can be horrible and transparent PNGs do not work.

I found a fix for jpeg image quality, but not yet PNG transparency.

Edit the file /html2ps/output.fpdf.class.php around line 422 there is this code:

imagejpeg($image->get_handle(), $filename);

simply add the quality argument to the imagejpeg function like so:

imagejpeg($image->get_handle(), $filename, 100);


Leave a Reply

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