Jump to content
Sign in to follow this  
Vger

Thumbnail PDF Catalogue

Recommended Posts

I have decided to start a new thread for this contribution, as the posts for it were getting mixed up with posts for the original PDF Catalog. This was getting to be very confusing.

 

Please follow ALL of the instructions in the Read Me First file that comes with the contribution and you should be okay. I have already had posts from people who have successfully installed this contribution, but have also received posts from people who just ignored some of the advice in the installation guide.

 

The contribution can be found here:

 

http://www.oscommerce.com/community/contributions,3423

 

Rhea (Vger)

Share this post


Link to post
Share on other sites

A quick recap on what the contribution does, and then a progress report.

 

The contribution combines an auto-thumbnailer which stores thumbs in a cache, from which the PDF Catalogue then takes its images - instead of from the main image folder. This reduces greatly creation time and file size, cutting down on php time-outs and file size errors. People are using it and it's working.

 

Its main problem, and it's a big one, is that you can't use sub-folders in the images folder e.g. manufacturer folders, because the pdf catalogue takes its data from the products_image table which includes the folder name, seperator (/), the image name and file type. - and we only want the image name and file type.

 

I have now reached the point where I have been successful in getting the PDF Catalogue to look for the images in the cache folder, and it's not looking for sub-folders there, just the image. This would allow the use of sub-folders within the main images folder.

 

The drawback is that there's a bug in the coding at the moment because it's also stripped out the image file type. If I can nail that problem (and if there are no others as a result) then the Thumbnail PDF Catalogue will be able to work with product images that are thumbnailed from sub-folders of the main images folder - without looking for those sub-folders in the cache folder.

 

When (if) I get it sorted you can be sure I'll post it here!

 

Vger

Share this post


Link to post
Share on other sites

I've just installed and configured this contribution and all went ok until I tried to generate a PDF from the admin.

 

The server returned a 509 error - Bandwidth exceeded. Looking at the logs, by generating the catalog, it pumped about 2.5Gig of traffic through the server.

 

The store has approx 250 products.

 

Is this amount of data transfer common?

 

Thanks,

Share this post


Link to post
Share on other sites

No, it's not normal. Are you sure you're working with the Thumbnail PDF Catalog and not the original PDF Catalog v1.5 - because this was a problem with the original pdf catalog, and one of the reasons for the thumbnailer.

 

The original pdf catalog would try to generate (by default) a catalogue in all three languages (english, spanish, german), and because of the file size it would get locked into a loop trying to generate all three. If the php max execution time was set to 30 seconds (the default) then it would just time out, but if it was reset to a higher value then it would just keep going.

 

Someone posted yesterday in another thread that they had used the Thumbnail PDF Catalog for 700 products and it generated in around 13 seconds, and was only 1 Mb or so in size. So either:

1. This is the original contribution you're using

2. It's not been installed correctly, as per the Read Me First html file - e.g. using images in sub-folders of the main images folder - or not having the GD library installed on your server

3. Your images are either GIFS (not recommended) and/or their original file size is enormous (Megabytes per image).

 

Vger

Edited by Vger

Share this post


Link to post
Share on other sites
No, it's not normal.  Are you sure you're working with the Thumbnail PDF Catalog and not the original PDF Catalog v1.5 - because this was a problem with the original pdf catalog, and one of the reasons for the thumbnailer.

 

I'd tried the original PDF catalog 1.5 and was having this problem... hence, why I downloaded the Thumbnailer PDF Catalog. I installed it on a clean OSC MS2 shop so there was no existing mods from the old version.

 

The original pdf catalog would try to generate (by default) a catalogue in all three languages (english, spanish, german), and because of the file size it would get locked into a loop trying to generate all three.  If the php max execution time was set to 30 seconds (the default) then it would just time out, but if it was reset to a higher value then it would just keep going.

 

I've removed all other languages from the system except for English so there shouldn't be any problems with multiple catalogs.

 

Someone posted yesterday in another thread that they had used the Thumbnail PDF Catalog for 700 products and it generated in around 13 seconds, and was only 1 Mb or so in size.  So either:

1.  This is the original contribution you're using

2.  It's not been installed correctly, as per the Read Me First html file - e.g. using images in sub-folders of the main images folder - or not having the GD library installed on your server

3.  Your images are either GIFS (not recommended) and/or their original file size is enormous (Megabytes per image).

 

Vger

 

1. Definately using the latest version of the contrib

2a. All my images are in the default directory (/catalog/images/*.*)

2b. The GD library is installed because the script is generating the thumbnails and writing them to the /catalog/images/imagecache/ directory.

3. All my images are jpg's and the largest image is about 70kB

 

I'm still locked out of the site at the moment... I'm trying to get the host to remove the bandwidth limit temporarily so I can get back in to the site and do more troubleshooting.

Share this post


Link to post
Share on other sites

If you were having this problem with the original PDF v1.5 and you're still having it with this contribution then it points to a problem with the server setup not being compatible with either version.

 

I am not up to speed yet on php5, but looking at the code in the PDF Catalog (either version), I would say that it's highly unlikely that it would be compatible - but I don't want to say that in the contribution 'Read Me First' file until I am certain of it. However, if your server uses php5 then, at this point in time, I would not recommend trying to install either version.

 

Vger

Share this post


Link to post
Share on other sites

The new 2.0 version of Thumbnail PDF Catalogue is now available for download.

 

The issue of having to have non-thumbnailed original images only in the main images folder, and not in sub-folders (e.g. Manufacturers) has now been resolved.

 

Vger

Share this post


Link to post
Share on other sites

Hi there

 

Silly question from a noob. Is there any way to use this mod to generate a pdf file using the store products but excluding all product images?

 

If you have a product for which the image is missing the whole catalogue generation will likely fail.

 

Needless to say, I have products with missing images :-" .

At any rate, we provide our clients with hardcopy image catalogues and I'd prefer it if I could generate a pdf pricelist without images.

 

Any comments and help would be greatly appreciated.

Ta muchly

Adam

Share this post


Link to post
Share on other sites

If you wish to generate a pdf catalogue without images then that's just a matter of a setting in admin/pdf_config.php:

 

//Show products image or not if not no links (0 = no, 1 = yes)

define('SHOW_IMAGES',1);

 

You just change the 1 to a zero. Please be aware that if you do this then the PDF Catalogue will not contain clickable links to the products info page on your website - but if you want it for a hardcopy PDF Catalogue then that wouldn't be a problem anyway.

 

Vger

Share this post


Link to post
Share on other sites

Zeak - if you have any problems with the Thumbnail PDF Catalogue then, for what you want, the original PDF Catalog v1.5 will work just as well. The problems with that revolved around the time it took to generate the catalog because of the images - but if you aren't using images then those problems go away.

 

Vger

Share this post


Link to post
Share on other sites
Zeak - if you have any problems with the Thumbnail PDF Catalogue then, for what you want, the original PDF Catalog v1.5 will work just as well.  The problems with that revolved around the time it took to generate the catalog because of the images - but if you aren't using images then those problems go away.

 

Vger

 

Hello VGer,

 

just a simple question, is it possible to reduce the gap between products? or can you point me in the direction of where to look.

 

 

also the best way to stop the ascii chars from showing incorrectly is to use a simple string replace eg...

replace

$description=rtrim(strip_tags($print_catalog_array[$j]['description']));

in admin/pdf_catalogue.php with

    $description=rtrim(str_replace("&", "&",  str_replace(" ", " ",strip_tags($print_catalog_array[$j]['description']))));

 

hth

Mike


"because it'll hurt more"- the greatest film of all time?

Share this post


Link to post
Share on other sites
just a simple question, is it possible to reduce the gap between products? or can you point me in the direction of where to look.

 

I'm fairly sure I answered this before. This is controlled in pdf_config.php:

 

// Blank lines before the products description cells

define('PRODUCTS_SEPARATOR', 20);

 

The smaller the image the smaller the number of lines needs to be.

 

Vger

Share this post


Link to post
Share on other sites
I'm fairly sure I answered this before.  This is controlled in pdf_config.php:

 

// Blank lines before the products description cells

define('PRODUCTS_SEPARATOR', 20);

 

The smaller the image the smaller the number of lines needs to be.

 

Vger

ok thanks

 

any ideas on drawing a horizontal rule between products?

 

Mike


"because it'll hurt more"- the greatest film of all time?

Share this post


Link to post
Share on other sites

Just installed this but for some reason it's not generating the pdf, i click save but all i get is this:

 

pdf_cat.jpg


Thanks for any help/comments.

 

Regards,

 

Lewis Hill

Share this post


Link to post
Share on other sites

OK I have uncommented the DEBUG and I am getting this, it is repeated many times for many products...: (??)

 

DEBUG: print_catalog_array :cky-logo-buckle.jpg DEBUG: imagedir :/xxxxxx/xx/xxxxxx/htdocs/images/imagecache/ DEBUG: imagename :cky-logo-buckle.jpg DEBUG: imagepath :/xxxxxx/xx/xxxxxx/htdocs/images/imagecache/cky-logo-buckle.jpg

 

the xs are my root to folder etc

 

Thanks again for any help


Thanks for any help/comments.

 

Regards,

 

Lewis Hill

Share this post


Link to post
Share on other sites

That debug notice shows that the paths are fine. If it showed you an error it would draw attention to it.

 

Check that your server has GD library installed, and double check that you followed all of the install instructions to the letter.

 

Vger

Share this post


Link to post
Share on other sites
That debug notice shows that the paths are fine.  If it showed you an error it would draw attention to it.

 

Check that your server has GD library installed, and double check that you followed all of the install instructions to the letter.

 

Vger

 

 

It seems that GD is there, from server_info.php:

gd

GD Support  enabled 

GD Version  2.0 or higher 

FreeType Support  enabled 

FreeType Linkage  with freetype 

GIF Read Support  enabled 

GIF Create Support  enabled 

JPG Support  enabled 

PNG Support  enabled 

WBMP Support  enabled 

 

I have been through it many times and i'm sure there's no mistakes.

 

Only thing I can think of is that I already had imagecache contrib installed, would this make a difference, like if it was a different version?

 

My site is here http://www.rockshopdirect.co.uk


Thanks for any help/comments.

 

Regards,

 

Lewis Hill

Share this post


Link to post
Share on other sites

OK, something else that's odd, is that if i set the catalogues folder to permissions '444', i get no change, just the same blank screen...?


Thanks for any help/comments.

 

Regards,

 

Lewis Hill

Share this post


Link to post
Share on other sites

The 'catalogues' folder has to be 777, because the programme needs to place the pdf files inside it.

 

If you already have an imagecache contribution installed I don't know if this will affect it or not.

 

Make sure that you have generated thumbnails of all product images by displaying them all once on your website - without this the thumbs aren't generated.

 

Vger

Edited by Vger

Share this post


Link to post
Share on other sites

Yes I have, when I first tried it last night i got an error saying there wasn't a picture in the cache for a product i had just added to the catalog.

 

Sorry I feel stupid asking if there's anything else I could try?


Thanks for any help/comments.

 

Regards,

 

Lewis Hill

Share this post


Link to post
Share on other sites

This contribution, v2.0, has worked for everyone who's installed it, so it has to be something to do with the way your site is set up.

 

If you have a pre-existing image caching contribution then this can only work by changing the directory that the image is pulled from to the folder where the cached images is kept. Perhaps that's the problem.

 

If it's not that then I'm afraid I'm out of ideas.

 

Vger

Share this post


Link to post
Share on other sites

I'm going to install a fresh osc, just to see if it's my site or my hosts.

 

I'll post an update ASAP!


Thanks for any help/comments.

 

Regards,

 

Lewis Hill

Share this post


Link to post
Share on other sites

I have installed another PDF generation contrib that works fine.

 

I was wondering if whether the fact that some of the images in my catalog or gifs would make a difference, ie cause the problem?


Thanks for any help/comments.

 

Regards,

 

Lewis Hill

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
Sign in to follow this  

×