Jump to content
  • Checkout
  • Login
  • Get in touch

osCommerce

The e-commerce.

Pdf_catalogs_V1.4 Some help please.


esurge

Recommended Posts

Posted

Hello all.

 

A simple problem i think.

 

This is the error I get when trying to produce a catalog.

 

Warning: getimagesize: Unable to open '/usr/local/customer/virtualfp/www.xxx.co.uk/images/sm-G3-12.JPG' for reading. in /www.xxx.co.uk/admin/fpdf.php on line 1418

FPDF error: Missing or incorrect image file: /usr/local/customer/virtualfp/www.xxx.co.uk/images/sm-G3-12.JPG

 

 

When set the image size in Admin > Config > Image to 80 x 80 it works.

 

This is the code that looks at the images sizes.

 ?	//If Small Image Width and Small Image Height are defined
?	if(strlen($data_array[0])>1 && strlen($data_array[1])>1)
?{
? ?$this->ShowImage($data_array[0],$data_array[1],$link,$data_array[12]);
? ?$y1=$this->GetY();
?}
? ? //If only Small Image Width is defined
?else if(strlen($data_array[0])>1 && strlen($data_array[1]))
?{ ? 
? ? ?$heightwidth=getimagesize($data_array[11]);
?	$data_array[0]=$data_array[0];
? ? ?$data_array[1]=$heightwidth[1]*PDF_TO_MM_FACTOR;
?	
? ?$this->ShowImage($data_array[0],$data_array[1],$link,$data_array[12]);
? ?$y1=$this->GetY();
?}
?//If only Small Image Height is defined
?else if(strlen($data_array[0]) && strlen($data_array[1])>1)
?{
?	$heightwidth=getimagesize($data_array[11]);
?	$data_array[0]=$width=$heightwidth[0]*PDF_TO_MM_FACTOR;
? ? ?$data_array[1]=$data_array[1];
?	
? ?$this->ShowImage($data_array[0],$data_array[1],$link,$data_array[12]);
? ?$y1=$this->GetY();
?}
?else
?{
?	$heightwidth=getimagesize($data_array[12]);
?	$data_array[0]=$heightwidth[0]*PDF_TO_MM_FACTOR;
? ? ?$data_array[1]=$heightwidth[1]*PDF_TO_MM_FACTOR;
?	
? ?$this->ShowImage($data_array[0],$data_array[1],$link,$data_array[12]);
? ?$y1=$this->GetY();
?}

 

 

I need to add to this code saying that the images are 80 x 80. But i want it to stay expty on the admin > config > image options to allow auto sizing.

 

Jazz

Posted

Change lines like that

 

$heightwidth=getimagesize($data_array[11]);

 

to

 

$heightwidth=getimagesize($data_array[12]);

 

and it should work!

 

Oh and watch out for the new version of PDF Catalogs ... !

Antonios

 

olympicslogo_en.gif

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...