Jump to content
  • Checkout
  • Login
  • Get in touch

osCommerce

The e-commerce.

PDF Catalogs v.159


Irin

Recommended Posts

I've installed PDF Catalogs v.159 in my online store. When I try to create the catalog, I get the following error:

 

FPDF error: Unsupported image file type: ........../httpdocs/oscommerce/images/

File : ........../httpdocs/osCommerce/images/

 

This error message doesn't point to any specific file. All my files in 'images' are .gif. And in 'admin/pdf_config.php' I set '1' for 'Resize images'. If I set it to '0', I get message: 'PNG or JPG only'.

 

What can I do? Please, help!

 

Irina.

Link to comment
Share on other sites

I've installed PDF Catalogs v.159 in my online store. When I try to create the catalog, I get the following error:

This error message doesn't point to any specific file. All my files in 'images' are .gif. And in 'admin/pdf_config.php' I set '1' for 'Resize images'. If I set it to '0', I get message: 'PNG or JPG only'.

 

What can I do? Please, help!

 

Irina.

 

look in your database, the pdf catalog reads the database for the images, not your files.

Treasurer MFC

Link to comment
Share on other sites

look in your database, the pdf catalog reads the database for the images, not your files.

 

Where do I need to look for images in database, in what table?

Is this possible to add an additional .pdf file (copy, paste in Catalogues dir), like 'part numbering', to show at the same page as Catalog, pdf_catalogue_info.php or it shows just what it has generated? How can I keep the names of .pdf files, not just 'Downloadable Catalog' but 'Products Catalog'?

 

Thanks.

Irina.

Link to comment
Share on other sites

I did few changes since my last post. I've changed all .gif to .jpg in images and in admin/pdf_catalogue.php:

 

if (strlen($print_catalog_array[$j]['image']) > 0) {

                        //$imagepath=DIR_FS_CATALOG.DIR_WS_IMAGES.$print_catalog_array[$j]['image'];

  $ashTemp = DIR_FS_CATALOG.DIR_WS_IMAGES.$print_catalog_array[$j]['image'];

  $ashimg = substr($ashTemp, 0, strlen($ashTemp) - 4) . ".jpg";

  $imagepath = $ashimg;

 

                    } else {

                        $imagepath=DIR_FS_CATALOG.DIR_WS_IMAGES.'/'.DEFAULT_IMAGE;

 

Now when I try to create the catalog, I get another error:

 

Warning:fopen(DIR_S_CATALOGimages/): failed to open stream: No such file or directory in D:\web\vhosts\tvielectronics.com\subdomains\shop-on-line\httpdocs\osCommerce\admin\pdf_fpdf.php on line 1493

 

Warning: feof(): supplied argument is not a valid stream resource in D:\web\vhosts\tvielectronics.com\subdomains\shop-on-line\httpdocs\osCommerce\admin\pdf_fpdf.php on line 1495

 

with the second Warning all the way to the bottom of the page.

 

I've already changed permissions to everything. What is the problem this time?

 

Please, help.

Irina.

Link to comment
Share on other sites

look in your database, the pdf catalog reads the database for the images, not your files.

 

well, you check in your products table to see if all products_image fields are correct. So no definitions like "my_image." or "my_image.gif" or "my_image.ttf"

 

the pdf class reads that field to see what the image type is, if it is not supported, you get the message. Irrespective of whether your physical image files are of the right type.

 

for your last error, somewhere in your file you use DIR_S_CATALOG which is not defined and probably should be DIR_FS_CATALOG

Treasurer MFC

Link to comment
Share on other sites

well, you check in your products table to see if all products_image fields are correct. So no definitions like "my_image." or "my_image.gif" or "my_image.ttf"

 

the pdf class reads that field to see what the image type is, if it is not supported, you get the message. Irrespective of whether your physical image files are of the right type.

 

for your last error, somewhere in your file you use DIR_S_CATALOG which is not defined  and probably should be DIR_FS_CATALOG

 

Could you please specify what file are you talking about. Is it admin/pdf_catalogue.php or pdf_fpdf.php?

 

Thanks.

Irina.

Link to comment
Share on other sites

I changed DIR_S_CATALOG to DIR_FS_CATALOG in pdf_fpdf.php. Now I get another error:

 

Warning: fopen(D:/web/vhosts/tvielectronics.com/subdomains/shop-on-line/httpdocs/osCommerce/images/): failed to open stream: Permission denied in D:\web\vhosts\tvielectronics.com\subdomains\shop-on-line\httpdocs\osCommerce\admin\pdf_fpdf.php on line 1493

 

Warning: feof(): supplied argument is not a valid stream resource in D:\web\vhosts\tvielectronics.com\subdomains\shop-on-line\httpdocs\osCommerce\admin\pdf_fpdf.php on line 1495

 

Warning: fread(): supplied argument is not a valid stream resource in D:\web\vhosts\tvielectronics.com\subdomains\shop-on-line\httpdocs\osCommerce\admin\pdf_fpdf.php on line 1496

 

and so on.

 

Though, I've selected write permission on images.

 

Please help.

Irina.

Link to comment
Share on other sites

I get all different kinds of errors. At this time error says:

 

Warning: imagecreatetruecolor(): Invalid image dimensions in D:\web\vhosts\tvielectronics.com\subdomains\shop-on-line\httpdocs\osCommerce\admin\pdf_catalogue.php on line 187

 

Warning: imagecopyresized(): supplied argument is not a valid Image resource in D:\web\vhosts\tvielectronics.com\subdomains\shop-on-line\httpdocs\osCommerce\admin\pdf_catalogue.php on line 188

 

Warning: imagejpeg(): supplied argument is not a valid Image resource in D:\web\vhosts\tvielectronics.com\subdomains\shop-on-line\httpdocs\osCommerce\admin\pdf_catalogue.php on line 193

 

Lines 187-193 in admin\pdf_catalogue.php says:

 

$im=imagecreatetruecolor($width/PDF_TO_MM_FACTOR, $height/PDF_TO_MM_FACTOR);

imagecopyresized($im, $src, 0, 0, 0, 0,$width/PDF_TO_MM_FACTOR, $height/PDF_TO_MM_FACTOR, $size[0], $size[1]);

} else {

$im=imagecreatetruecolor($height/PDF_TO_MM_FACTOR,$width/PDF_TO_MM_FACTOR);

imagecopyresized($im, $src, 0, 0, 0, 0, $height/PDF_TO_MM_FACTOR, $width/PDF_TO_MM_FACTOR, $size[0], $size[1]);

}

if(!imagejpeg($im, $destination.$array[$last-1])) {

exit();

 

What should I change?

 

Thanks.

Irina.

Link to comment
Share on other sites

  • 2 months later...

Downloaded v.159 and followed every instruction troughout the readme file.

 

Every thing looks good until I start the generate catalog(s) process.

 

First of all i get these errors:

 

Warning: fopen(DIR_S_CATALOGimages/oscommerce.gif): failed to open stream: No such file or directory in /home/vhosts2/k/i/domain.no/www/catalog/admin/pdf_fpdf.php on line 1493

 

Warning: feof(): supplied argument is not a valid stream resource in /home/vhosts2/k/i/domain.no/www/catalog/admin/pdf_fpdf.php on line 1495

 

Warning: fread(): supplied argument is not a valid stream resource in /home/vhosts2/k/i/domain.no/www/catalog/admin/pdf_fpdf.php on line 1496

 

The two last errors keep on coming over and over again for like 2-400 times or so.

 

Don't know what's wrong since I've done everything in the readme...

 

Also my browser (Opera) hangs after receiving about 120Mb from my shop when generating the pdf.

 

The result in this is that I have to end Opera.

 

 

 

Please help you guys.... I need this PDF Catalog.

Link to comment
Share on other sites

  • 3 weeks later...

This contribution is generating a big amount of all kinds of errors :(

 

My product images do not show up at all, for example.

 

 

enurweb, edit DIR_S_CATALOG ti DIR_FS_CATALOG in admin/pdf_fpdf.php on line 1495.

Link to comment
Share on other sites

I've been working on this contribution for some time now, and one thing I have realised - it doesn't work properly if the images for your catalogue include GIF images - even though support for GIFS is supposedly included in the contribution.

 

It works fine with JPEGS, and renders the PDF files quickly and in all enabled languages. Include GIFS and the PDF is generated very slowly, as it's not possible to resize GIF images with this contribution the way it is currently written. Also it's been my experience that if the images are GIFS it never gets further than generating one catalogue - in the default language id.

 

The best thing for this contribution would be to use it with the auto-thumbnail contribution and pull the images from the thumbs folder.

 

Vger

Link to comment
Share on other sites

  • 7 months later...

What can be wrong here : Missing or incorrect image file: C:/Apache2/htdocs/DOMAIN/Webshop15/images/microsoft/msimpro.jpgFPDF error: Not a JPEG file: C:/Apache2/htdocs/DOMAIN/Webshop15/images/

 

The .jpg file are in the folder, so can someone help me here ??? All my product files are .jpg and 100x80

 

Thanks

 

//TheExterminator

Edited by TheExterminator
Link to comment
Share on other sites

The SQL In The admin/pdf_catalogue.php Is:

 

select p.products_id, pd.products_name, pd.products_description, p.products_image, p.products_model, p.products_price, p.products_tax_class_id, IF(s.status, s.specials_new_products_price, NULL) as specials_new_products_price, p.products_date_added, m.manufacturers_name from " . TABLE_PRODUCTS . " p, " . TABLE_MANUFACTURERS . " m, " . TABLE_PRODUCTS_DESCRIPTION . " pd, " . TABLE_SPECIALS . " s, " . TABLE_CATEGORIES . " c, " . TABLE_PRODUCTS_TO_CATEGORIES . " p2c where p.products_id = s.products_id and p.manufacturers_id = m.manufacturers_id and products_status = '1' and p.products_id = pd.products_id and pd.language_id = '" . $languages_id . "' and p.products_id = p2c.products_id = c.categories_id order by pd.products_name, p.products_date_added DESC";

Link to comment
Share on other sites

  • 2 months later...
What can be wrong here : Missing or incorrect image file: C:/Apache2/htdocs/DOMAIN/Webshop15/images/microsoft/msimpro.jpgFPDF error: Not a JPEG file: C:/Apache2/htdocs/DOMAIN/Webshop15/images/

 

The .jpg file are in the folder, so can someone help me here ??? All my product files are .jpg and 100x80

 

Thanks

 

//TheExterminator

Hi Michael,

 

Would you mind to share how you fixed your error with Missing or incorrect image file? I'm also trying to generate a PDF catalogue and getting the same message on Apache server:

Missing or incorrect image file: /var/www/store/osCommerce/images/Image.jpgFPDF error: Not a JPEG file: /var/www/store/osCommerce/images/
though my Image.jpg is in the /images/ directory. What can be a problem? Any help would be appreciated.

 

Thanks.

Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Unfortunately, your content contains terms that we do not allow. Please edit your content to remove the highlighted words below.
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...