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
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
Share on other sites

This thread is more than a year old. Please don't revive it unless you have something important to add.

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • 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.