Display an image. The size it will take on the page can be specified in different ways
Supported formats are JPEG, PNG and GIF. The GD extension is required for GIF.
Image(string file [, float x [, float y [, float w [, float h [, string type [, mixed link]]]]]])
<?php require_once "fpdf/fpdf.php"; //fpdf supporting file $pdf = new FPDF('P','mm','A4'); /* A4 - 210 * 297 mm */ $pdf -> AddPage(); //addFont(family,style,file) $pdf -> addFont('Roboto','','Roboto.php'); $pdf -> SetFont('Roboto','',12); $pdf -> Cell(190,10,'Place Image','B',1,'C'); $pdf -> Cell(190,5,'',0,1,'C',false); //Image(string file [,float x [,float y [, float w [, float h [, string type [, mixed link ]]]]]]) /*----------------------Place Image-------------------------------------*/ //Image(string file) $pdf -> Image("img/logo.png"); /*----------------------Place Image with x and y-------------------------------------*/ //Image(string file,x,y) $pdf -> Image("img/logo.png",50,50); /*----------------------Place Image with x,y,height,width and type-------------------------------------*/ //Image(string file,x,y) $pdf -> Image("img/logo.png",50,120,10,20,'PNG'); $pdf -> Output(); // Display output ?>View Demo
Learn All in Tamil © Designed & Developed By Tutor Joes | Privacy Policy | Terms & Conditions