PHP Classes

not working

Recommend this page to a friend!

      Verbo Magia  >  All threads  >  not working  >  (Un) Subscribe thread alerts  
Subject:not working
Summary:missing fonts
Messages:25
Author:synthetron
Date:2015-10-26 13:38:55
 
  1 - 10   11 - 20   21 - 25  

  11. Re: not working   Reply   Report abuse  
Picture of Luciano Salvino 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

  12. Re: not working   Reply   Report abuse  
Picture of synthetron 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

  13. Re: not working   Reply   Report abuse  
Picture of synthetron 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

  14. Re: not working   Reply   Report abuse  
Picture of synthetron 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");

  15. Re: not working   Reply   Report abuse  
Picture of synthetron synthetron - 2015-10-27 20:52:36 - In reply to message 13 from synthetron

  16. Re: not working   Reply   Report abuse  
Picture of 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');

  17. Re: not working   Reply   Report abuse  
Picture of synthetron synthetron - 2015-10-27 21:11:31 - In reply to message 16 from synthetron
dimensions are not pixels but milimeters

  18. Re: not working   Reply   Report abuse  
Picture of Luciano Salvino 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");

  19. Re: not working   Reply   Report abuse  
Picture of synthetron 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

  20. Re: not working   Reply   Report abuse  
Picture of synthetron 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

 
  1 - 10   11 - 20   21 - 25