|
|
 Luciano Salvino - 2015-10-27 18:49:43 - In reply to message 10 from synthetron
You can use Image function:
$this->Image($imagePath,$x,$y,$imageWidth,$imageHeight,$type,$url);
See http://fpdf.org/en/doc/image.htm
 synthetron - 2015-10-27 18:54:35 - In reply to message 11 from Luciano Salvino
// Insert a logo in the top-left corner at 300 dpi
$pdf->Image('logo.png',10,10,-300);
gave error
 synthetron - 2015-10-27 20:41:27 - In reply to message 12 from synthetron
( ! ) Deprecated: Function set_magic_quotes_runtime() is deprecated in C:\wamp\www\welcome\phptools\verbopdf\fpdf.php on line 910
Call Stack
# Time Memory Function Location
1 0.0039 925304 {main}( ) ..\genBook.php:0
2 0.0302 1851752 PDF->CreaIndex( ) ..\genBook.php:543
3 0.0384 1946704 FPDF->Image( ) ..\genBook.php:258
( ! ) Deprecated: Function set_magic_quotes_runtime() is deprecated in C:\wamp\www\welcome\phptools\verbopdf\fpdf.php on line 923
Call Stack
# Time Memory Function Location
1 0.0039 925304 {main}( ) ..\genBook.php:0
2 0.0302 1851752 PDF->CreaIndex( ) ..\genBook.php:543
3 0.0384 1946704 FPDF->Image( ) ..\genBook.php:258
FPDF error: Some data has already been output, can't send PDF file
 synthetron - 2015-10-27 20:41:59 - In reply to message 13 from synthetron
$this->Image("logo.png",50,50,200,100,"png","http://www.synthetron.com");
 synthetron - 2015-10-27 20:52:36 - In reply to message 13 from synthetron
 synthetron - 2015-10-27 21:09:43 - In reply to message 13 from synthetron
when you disable those 2 lines it show logo
but with wrong dimensions not following the parameters
$this->Image('logo.png',20,20,300,100,'PNG','http://www.synthetron.com');
 synthetron - 2015-10-27 21:11:31 - In reply to message 16 from synthetron
dimensions are not pixels but milimeters
 Luciano Salvino - 2015-10-27 23:19:40 - In reply to message 17 from synthetron
you can use this function:
function put_img($x,$y,$imageWith,$imagePath,$dpi='72',$url='') {
$imgSize = getimagesize($imagePath);
$imgRatio = $imgSize[0] / $imageWith;
$outWidth = ($imgSize[0]/($imgRatio));
$outHeight = ($imgSize[1]/($imgRatio));
$this->Image($imagePath,$x,$y,$outWidth,$outHeight,'',$url);
}
$this->put_img(50,50,200,"logo.png",300,"http://www.synthetron.com");
 synthetron - 2015-10-28 07:32:33 - In reply to message 18 from Luciano Salvino
that does not fix
set_magic_quotes_runtime() error
pity you cant attach files here
 synthetron - 2015-10-28 07:36:15 - In reply to message 18 from Luciano Salvino
( ! ) Fatal error: Call to undefined method PDF::put_img() in C:\wamp\www\welcome\phptools\verbopdf\genBook.php on line 229
Call Stack
# Time Memory Function Location
1 0.0055 916144 {main}( ) ..\genBook.php:0
2 0.0391 1841440 PDF->CreaIndex( ) ..\genBook.php:564
|