Reputation: 1010
I want to generate a PDF that will contain an image.
so i already tried this line of codes:
$pdf->Image('b.png',10,8,33);
the other is:
$pdf->Image('Project_ITCPH\images.jpg', 1, 10, 5.8, 1.5);
the problem here is this Error:
"Deprecated: Function set_magic_quotes_runtime() is deprecated in C:\xampp\htdocs\Project_ITCPH\reports\fpdf.php on line 931 FPDF error: Alpha channel not supported: b.png"
is there a problem with the fpdf.php? i only use it as include.
You have my regards.
Upvotes: 0
Views: 18513
Reputation: 1
Try $pdf->Image('..\Project_ITCPH\images.jpg', 1, 10, 5.8, 1.5); this is some time happen cause server could not find the folder path hope this work for u also try this
require('fpdf.php');
Upvotes: 0
Reputation: 3075
Check out this class it lets you add images to PDF's with PHP it has a lot of demo's
https://github.com/dompdf/dompdf
Upvotes: 0
Reputation: 4320
This error simply means that FPDF is using a function call that is deprecated and outdated. This is shown because your PHP displays errors and warnings and deprecation notes. You should try turning off errors before generating the PDF or writing @ before function calls (like here) when using FPDF.
Upvotes: 4