♥Vger Posted August 9, 2005 Share Posted August 9, 2005 I say in the install instructions that this does not work if you use sub-folders of the main images folder, and that's what 'jedko' is. Vger Quote Link to comment Share on other sites More sharing options...
computerFreek Posted August 9, 2005 Share Posted August 9, 2005 I say in the install instructions that this does not work if you use sub-folders of the main images folder, and that's what 'jedko' is. Vger <{POST_SNAPBACK}> Ok Fair enough, but what about the second part of the error logo.jpg is not a jpeg????? looks like a jpeg to me. ;) Quote Link to comment Share on other sites More sharing options...
computerFreek Posted August 9, 2005 Share Posted August 9, 2005 Ok Fair enough, but what about the second part of the error logo.jpg is not a jpeg????? looks like a jpeg to me. ;) <{POST_SNAPBACK}> never mind once I removed the images which were in subfolders the catalog generated as expected. Thanks for the pointer - Bit of a noob to php so I'm kinda feeling my way in the dark with this stuff. Quote Link to comment Share on other sites More sharing options...
♥Vger Posted August 9, 2005 Share Posted August 9, 2005 I'm sorry but this is just a part of the original PDF programme. Every time it encounters something it can't do it throws up an error file which often has nothing to do with what the problem really is. One user was getting the error that it could not resize the image because it didn't exist. The image existed alright, but the problem was that it was the same size or smaller than the minimum image size in the osC admin panel and so it couldn't be thumbnailed. The programmes response was to say it didn't exist. In another part of the programme it reads as though it is supposed to place a default image (no-image) when a product does not have an image, but this is actually an error code and will stop the whole process in its tracks. I tested a mod that was supposed to cure this but the mod didn't work either. I really would like to clean up this programme, but getting the time is the problem. At the moment I'm working on trying to get it to create mirror sub-folders to match those in the main images folder to get around the problem of having to keep all images in the main images folder - but it's not going too well. Vger Quote Link to comment Share on other sites More sharing options...
♥Vger Posted August 9, 2005 Share Posted August 9, 2005 Glad you got it working okay. Would be nice to get some feedback on the time (roughly, in seconds) it took to generate the Thumbnail PDF Catalogue and what the file size is. Vger Quote Link to comment Share on other sites More sharing options...
computerFreek Posted August 10, 2005 Share Posted August 10, 2005 Glad you got it working okay. Would be nice to get some feedback on the time (roughly, in seconds) it took to generate the Thumbnail PDF Catalogue and what the file size is. Vger <{POST_SNAPBACK}> sorry i am using the origonal contrib, but I am going to try the thumbnail on because the origional one takes 15 minutes to process the file (mind you there is 1500 products).hopefully the thumbnail version wont take so long. Also with the original one i get an error when i open or print the pdf saying "insufficient data for an image" and then some of the images are there and others aren't, any ideas???? Quote Link to comment Share on other sites More sharing options...
computerFreek Posted August 10, 2005 Share Posted August 10, 2005 Ok now when I try to use the thumbnail version I get: Missing or incorrect image file: /home/www/public_html/catalog/images/imagecache/USPCH.jpgFPDF error: Not a JPEG file: /home/www/public_html/catalog/images/logo.jpg the directory has full access enabled, all images are under catalog/images (no sub folders) no userfull error generated in server logs. Any Ideas????? Quote Link to comment Share on other sites More sharing options...
computerFreek Posted August 10, 2005 Share Posted August 10, 2005 Ok, I have reverted back to the original version for the moment. There appears to be something wrong with the jpeg processing code (couldn't tell you where as I dont understand what it does yet), I noticed that all the products with jpeg images have no images in the pdf whereas the ones which have gif images work fine. ????????? Quote Link to comment Share on other sites More sharing options...
computerFreek Posted August 10, 2005 Share Posted August 10, 2005 (edited) Ok, I have reverted back to the original version for the moment. There appears to be something wrong with the jpeg processing code (couldn't tell you where as I dont understand what? it does yet), I noticed that all the products with jpeg images have no images in the pdf whereas the ones which have gif images work fine. ????????? <{POST_SNAPBACK}> Ok thanks to "da-Idiot" and "TooLoo" i have a solution to the jpeg issue: in pdf_catalog.php line 173 shoould read: $destination=DIR_FS_CATALOG."catalogues/"; not $destination =DIR_FS_CATALOG."catalogues/"; And in pdf_fpdf.php lines 1476 to 1481 should be: if(!$a){ ? ?print('Missing or incorrect image file: '.$file); ?$file=DIR_FS_CATALOG.DIR_WS_IMAGES.DEFAULT_IMAGE; ?//$this->Error('Missing or incorrect image file: '.$file); ?} not if(!$a) ? ?print('Missing or incorrect image file: '.$file); ?$file=DIR_FS_CATALOG.DIR_WS_IMAGES.DEFAULT_IMAGE; ?//$this->Error('Missing or incorrect image file: '.$file); ? NOTE: there are missing {}'s Still cant get the thumbnail version going though. this would help as my pdf sits at 30mb and take about 1/2 hour to generate (not the fastest server though - its for testing) Thanks in advance. Edited August 10, 2005 by computerFreek Quote Link to comment Share on other sites More sharing options...
computerFreek Posted August 10, 2005 Share Posted August 10, 2005 (edited) For anyone wondering this is how you can output the data from the products_extra_fields contribution to the pdf file. Note: I am new to php so bear that in mind. Firstly add the following to pdf_catalog.php (I added it at line 426 so it would apear under the model): ?//include product_extra_fields ?if(SHOW_PRODUCTS_EXTRA_FIELDS) ?{ ?$extra_fields_query = tep_db_query(" ?SELECT pef.products_extra_fields_name as name, ptf.products_extra_fields_value as value ?FROM ". TABLE_PRODUCTS_EXTRA_FIELDS ." pef ?LEFT JOIN ?". TABLE_PRODUCTS_TO_PRODUCTS_EXTRA_FIELDS ." ptf ?ON ptf.products_extra_fields_id=pef.products_extra_fields_id ?WHERE ptf.products_id=".$data_array[10]." ?ORDER BY products_extra_fields_order"); ?while ($extra_fields = tep_db_fetch_array($extra_fields_query)) { ? if ($extra_fields['value'] != '') { ? ?$line=$extra_fields['name'].": ?".$extra_fields['value']; ? ?$this->Cell($data_array[0]+6,5,"",0,0); ? ? $this->MultiCell($this->text_fw,5,$line,PRODUCTS_BORDER,'L'); ? } ?} ?} Then In you pdf_config.php file add the following just before the ?>(this allows you to turn this on and off): //Show the Product extra fields if you have this module installed (0 = no, 1 = yes) //It can be downloaded from http://www.oscommerce.com/community/contributions,2202 define('SHOW_PRODUCTS_EXTRA_FIELDS',1); If anyone has a better way or any suggestions please feel free to comment. This is just my way of giving something back to the community. PS: Should I add this as a contrib, and if so where?? Edited August 10, 2005 by computerFreek Quote Link to comment Share on other sites More sharing options...
♥Vger Posted August 10, 2005 Share Posted August 10, 2005 Just to make the point that those are errors in the original PDF Catalog, and are not present in the Thumbnail version. There's also a reference to DIR_S_CATALOG in the original which should have been DIR_FS_CATALOG. As for your amendment you can post that as a seperate file to the original contribution if you wish. I am happy to incorporate it as an optional add-on to the Read Me First file for the Thumbnail PDF Catalog, with credit to yourself if you wish. I don't know why you can't get this (Thumbnail PDF Catalogue) working. I have already had reports back from others who have installed it and have it working. Vger Ok thanks to "da-Idiot" and "TooLoo" i have a solution to the jpeg issue: in pdf_catalog.php line 173 shoould read: $destination=DIR_FS_CATALOG."catalogues/"; not $destination =DIR_FS_CATALOG."catalogues/"; And in pdf_fpdf.php lines 1476 to 1481 should be: if(!$a){ ? ?print('Missing or incorrect image file: '.$file); ?$file=DIR_FS_CATALOG.DIR_WS_IMAGES.DEFAULT_IMAGE; ?//$this->Error('Missing or incorrect image file: '.$file); ?} not if(!$a) ? ?print('Missing or incorrect image file: '.$file); ?$file=DIR_FS_CATALOG.DIR_WS_IMAGES.DEFAULT_IMAGE; ?//$this->Error('Missing or incorrect image file: '.$file); ? NOTE: there are missing {}'s Still cant get the thumbnail version going though. this would help as my pdf sits at 30mb and take about 1/2 hour to generate (not the fastest server though - its for testing) Thanks in advance. <{POST_SNAPBACK}> Quote Link to comment Share on other sites More sharing options...
computerFreek Posted August 11, 2005 Share Posted August 11, 2005 I would apreciate if you would add this to the readme. As for the thumbnail thing I will work on it maybe I am missing something. Thanks. Quote Link to comment Share on other sites More sharing options...
♥Vger Posted August 11, 2005 Share Posted August 11, 2005 The products_extra_fields code has been added as an optional file to the Thumbnail PDF Catalogue (under your name). Thanks for the input! By the way, to avoid confusion with the original contribution, I have started a support thread for the Thumbnail PDF Catalogue at: http://www.oscommerce.com/forums/index.php?showtopic=164600 Vger Quote Link to comment Share on other sites More sharing options...
Guest Posted August 11, 2005 Share Posted August 11, 2005 Glad you got it working okay. Would be nice to get some feedback on the time (roughly, in seconds) it took to generate the Thumbnail PDF Catalogue and what the file size is. Vger <{POST_SNAPBACK}> Hi, got the contribution working fine, on a 700 item catalog it was 13 seconds generating and produced a 1.94MB size file. Would probably be faster and smaller if I could figure out how to get it to list more then 4 products per page, or if there was a wayto get 2 columns per page. Great work Vger!!!! Quote Link to comment Share on other sites More sharing options...
♥Vger Posted August 11, 2005 Share Posted August 11, 2005 I'm glad it's working out for you Wayne. I've started a new thread for this now, as it's a bit confusing for the people just using the original PDF Catalog contribution to come here and find all of this thread. The new support thread is here: http://www.oscommerce.com/forums/index.php?showtopic=164600 Vger Quote Link to comment Share on other sites More sharing options...
alkiskai Posted September 19, 2005 Share Posted September 19, 2005 hello i get this error in 1.59 FPDF error: Incorrect orientation: pdf_orientation how can i fix this weird problem Quote Link to comment Share on other sites More sharing options...
♥Vger Posted September 19, 2005 Share Posted September 19, 2005 This only occurs when you have entered an incorrect orientation in the pdf_config file. Correct orientations are 'P' for portrait and 'L' for landscape. Vger Quote Link to comment Share on other sites More sharing options...
pleymo Posted September 22, 2005 Share Posted September 22, 2005 Hello i can generete catalog without image but when I try with images I have an error message: Fatal error: Call to undefined function: imagecreatefromjpeg() in d:\web\www\admin\pdf_catalogue.php on line 175 thanks Quote Link to comment Share on other sites More sharing options...
♥Vger Posted September 22, 2005 Share Posted September 22, 2005 Make sure that your server has GD Library installed. Look in your osCommerce admin panel under Tools --> Server Info. Vger Quote Link to comment Share on other sites More sharing options...
pleymo Posted September 22, 2005 Share Posted September 22, 2005 Hello thanks Vger, it was that ;), but now if I resize image I have this message: Warning: imagecreate(): Invalid image dimensions in d:\web\www\admin\pdf_catalogue.php on line 187 Warning: imagecopyresized(): supplied argument is not a valid Image resource in d:\web\www\admin\pdf_catalogue.php on line 188 Warning: imagejpeg(): supplied argument is not a valid Image resource in d:\web\www\admin\pdf_catalogue.php on line 193 If I put to 0 (no resize) it turns turns etc... and nothing happen, i must do ctrl alt sup to shut down application Quote Link to comment Share on other sites More sharing options...
♥Vger Posted September 22, 2005 Share Posted September 22, 2005 Make sure that the size of the image (all images) is greater than the Small Image Size defined in your osCommerce amdin panel, under Configuration --> Images. Vger Quote Link to comment Share on other sites More sharing options...
pleymo Posted September 22, 2005 Share Posted September 22, 2005 thanks for your help You mean that the size of images in pdf_config.php: //Width max in mm define('MAX_IMAGE_WIDTH',105); //Height max in mm define('MAX_IMAGE_HEIGHT', ''); must be bigger than size image in osCommerce amdin panel, Configuration --> Images in my case it's width 100 height 80 thanks Quote Link to comment Share on other sites More sharing options...
♥Vger Posted September 22, 2005 Share Posted September 22, 2005 No, I mean that none of your product images must be smaller in size than the small image width or height in your osC admin panel under 'Images'. If even one of your product images is smaller than the small image width or height then the process will fail. Vger Quote Link to comment Share on other sites More sharing options...
pleymo Posted September 22, 2005 Share Posted September 22, 2005 hello, I had images smaller than small image definition in oscommerce admin, I fixed it but I have always the same message Warning: imagecreate(): Invalid image dimensions in d:\web\www\admin\pdf_catalogue.php on line 187 Warning: imagecopyresized(): supplied argument is not a valid Image resource in d:\web\www\admin\pdf_catalogue.php on line 188 Warning: imagejpeg(): supplied argument is not a valid Image resource in d:\web\www\admin\pdf_catalogue.php on line 193 all my images are in jpg dimension 100 x 80 idem in oscommerce admin I don't understand... Quote Link to comment Share on other sites More sharing options...
♥Vger Posted September 22, 2005 Share Posted September 22, 2005 Warning: imagecreate() Back to basics again. This error message is usually an indication that you don't have GD Library installed in PHP. Vger Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.