Jump to content
  • Checkout
  • Login
  • Get in touch

osCommerce

The e-commerce.

add on help


Guest

Recommended Posts

Hello

 

Sorry to post

 

I have 2.3.1 and need a pdf catlog so installed this add on and didnt work when I clicked save on the generate catalog

 

http://addons.oscommerce.com/info/7727/v,23

 

I thought it could be that I am using png files so I used jpg files instead but still getting this error

 

FPDF error: Alpha channel not supported

 

First time I have seen this error so not sure how I can fix it

Link to comment
Share on other sites

first of all did you change the filename extension in the code to reflect the change from png to jpg

 

and secondly are your png's transparent??? If so then this could be your problem.

Link to comment
Share on other sites

Hi Pupstar

 

I converted all my pngs to jpgs using a image converter and I think the pngs are transparent, what do you mean changed the filename extension in the code

 

What code, sorry

 

Is there a quick way of taking the transparency off the pngs as I have 540 odd products, it would take me forever to take it off each one

Link to comment
Share on other sites

Images having an Alpha channel are not supported by the FPDF functions. You will need to convert your image to remove the Alpha channel.

 

(source originally by Kymation from another thread :- )

Link to comment
Share on other sites

I have already converted the png files to jpg files

 

What code do I need to change when you mentioned changing the filename extension is the code

Link to comment
Share on other sites

have a look at this code in pdf_catalogue_info2.php

 

function ShowImage(&$width,&$height,$link,$path)
{
  $width=min($width,MAX_IMAGE_WIDTH);
   $height=min($height,MAX_IMAGE_HEIGHT);
   if(RESIZE_IMAGES) {
$destination =DIR_FS_CATALOG."catalogues/";
if(substr(strtolower($path), (strlen($path)-4),4)==".jpg" || substr(strtolower($path), (strlen($path)-5),5)==".jpeg") {
	    $src=imagecreatefromjpeg($path);
   } else if (substr(strtolower($path), (strlen($path)-4),4)==".png") {
	   $src=imagecreatefrompng($path);
   } else {
	   echo "Only PNG and JPEG";
	    exit();
   }

Link to comment
Share on other sites

I am winning slowly and painfully I think

 

I downloaded the FPDF 1.7 version which does support alpha channels and clicked on generate catalog but got this error now

 

FPDF error: Could not include font metric file

 

How do I fix that one

Link to comment
Share on other sites

The FPDF library will not work correctly with osCommerce 2.3.1. For one, it doesn't support Unicode/UTF fonts, and osC uses UTF-8 encoding. You could replace the library with TCPDF, but it would probably be easier to just start over.

 

Regards

Jim

See my profile for a list of my addons and ways to get support.

Link to comment
Share on other sites

Hi Kymation

 

Do you mean remove the add on and install it again

 

I am thinking though if you do mean that, I will have the same problem again with the images and the alpha channel not supported

Link to comment
Share on other sites

Archived

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

×
×
  • Create New...