I tried to put an image in my pdf document, bu开发者_开发问答t when I use that method it only loading for a while, and do nothing (no errors, or such things) only a grey site...
$pdf = new FPDF();
$pdf->AddPage();
$pdf->Image('logo.png');
$pdf->Output();
So what I do wrong? If I only use text in the pdf, it's no problem, but with the Image. The Image is in the root-directory.
Edit: Added $pdf->AddPage();
as per the comment in Ewan Heming's answer.
Your example doesn't include a method call to add a page to the PDF before placing the image on it:
$pdf = new FPDF();
$pdf->AddPage();
$pdf->Image('logo.png');
$pdf->Output();
Sry guys i found out the problem , the resolution of the picture was too big
精彩评论