Jump to content

FPDF Images


JonnoTheDev

Recommended Posts

When using FPDF and inserting an image of png format into the document, the image looks pixelated. By not setting the height and width the image size should automatically be calculated. I get the same results if I set the image size.

 

$pdf->Image('logo.png',0,0,0,0);

 

Has anyone had this issue?

Link to comment
https://forums.phpfreaks.com/topic/131621-fpdf-images/
Share on other sites

595 x 31px is almost certainly too small to look good after stretched to A5.

 

Some calculations: landscape A5 width is 210mm, so with 595pixels it's just under 3 dots/mm... Not enough for print material.

 

The image I use for background on portrait A4 is 1062x695px in 120 dpi. (1062 being width, so the same as width of landscape A5). Looks good with these settings (some pixelation still visible, but it's background watermark, so I don't care that much).

Link to comment
https://forums.phpfreaks.com/topic/131621-fpdf-images/#findComment-684444
Share on other sites

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.