Jump to content
  • Checkout
  • Login
  • Get in touch

osCommerce

The e-commerce.

PDF-Catalog Problem


Jenpet

Recommended Posts

tried out the pdf-catalog.... but it didn't work...

 

got this error-message

Warning: fopen("..//katalog/catalogues/catalog_2.pdf", "wb") - No such file or directory in *****/katalog/admin/fpdf.php on line 1023

FPDF error: Unable to create output file: ..//katalog/catalogues/catalog_2.pdf

 

hope someone can help... the sample looks like great work

 

thanx in advance, bye jenpet

Link to comment
Share on other sites

  • 2 weeks later...
  • Replies 50
  • Created
  • Last Reply

Top Posters In This Topic

I am guessing that you received this error from the store info box? I think that that error is generated if you haven't generated the catalog in the admin area yet..

 

I may be wrong, but I was getting the same error and I noticed my issue was in the admin when I tried to generate the catalog...

Link to comment
Share on other sites

  • 1 month later...

I think it is a problem with fopen - I've just installed this contrib and have got it working ok now - had the same error.

 

What I did was;

 

1 - Make directory catalog/catalogues chmod 777

 

2 - In admin/fpdf.php changed line 1023 from

 

$f=fopen($file,'wb');

 

To

 

$f=fopen($file,'w+');

 

3 - In admin/pdfcatalogue.php changed following lines

 

151

From

$destination ="../".DIR_WS_CATALOG."catalogues/";

To

$destination = DIR_FS_CATALOG . 'catalogues/';

 

617

From

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

To

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

 

691

From

$imagepath="../".DIR_WS_CATALOG.DIR_WS_IMAGES.$products_new_array[$nb]['image'];

To

$imagepath= DIR_FS_CATALOG . DIR_WS_IMAGES . $products_new_array[$nb]['image'];

 

732

From

$pdf->Output("../".DIR_WS_CATALOG."catalogues/catalog_".$languages[$i]['id'].".pdf",false);

To

$pdf->Output( DIR_FS_CATALOG . 'catalogues/catalog_' . $languages[$i]['id'].".pdf",false);

 

 

Hope this helps

Cheers

Clint :wink:

Link to comment
Share on other sites

i have a problem with the images. got this error-message:

 

FPDF error: Image file has no extension and no type was specified: //usr/local/httpd/htdocs/kunden/web63/html/shop/catalog/images/

 

hope someone can help.

 

thanx in advance, bye susi

Link to comment
Share on other sites

Hi Susi,

 

I had one or two problems with images when the script was processing my catalog.

 

Basically all the images in your catalog have to be either .jpg or .png - .gif's don't work and also any image that doesn't have the right extension won't work (e.g. a jpeg file that is called image. rather than image.jpg).

 

Does this help?

 

All the best Clint

Link to comment
Share on other sites

  • 2 weeks later...

Hi!

 

I get following error..

 

FPDF error: Unsupported image file type: gif

 

I don?t got any products with .gif pictures.

Just .jpg pictures..

 

But I got some system pictures that ends with .gif

 

header_account.gif

header_cart.gif

header_checkout.gif

 

Every company pictures and category pictures are .gif pictures.

 

I have made the changes that Clint Fern wrote, but it will not work anyway.

 

 

Best Regards,

Patrick Andersson

Link to comment
Share on other sites

Hi!

 

I made some modification in the program, and now it works perfect.

But.. I?m not satisfied.. 8)

 

How do I remove the index / category in the beginning of the PDF document?

 

And can I change the frontpage? Maybe also add a page at the end with delivery and shipping terms?

 

Hmmm... I?m never satisfied... :D

 

/Patrick

Link to comment
Share on other sites

i have a problem with the images. got this error-message:

 

FPDF error: Image file has no extension and no type was specified: //usr/local/httpd/htdocs/kunden/web63/html/shop/catalog/images/

 

[ :wink: /quote]

 

 

add into pdf_config.php

//-------------------------------------------------------------------------

define('MAX_DISPLAY_PRODUCTS_NEW',10);//Max Display New Products

//-------------------------------------------------------------------------

 

add into pdf_catalogue.php

befor

//-------------------------------------------------------------------------

for($nb=0; $nb < $MAX_DISPLAY_PRODUCTS_NEW_1; $nb++)

//-------------------------------------------------------------------------

 

add

//-------------------------------------------------------------------------

if((sizeof($products_new_array))< MAX_DISPLAY_PRODUCTS_NEW )

{

$MAX_DISPLAY_PRODUCTS_NEW_1=(sizeof($products_new_array));

}

else

{

$MAX_DISPLAY_PRODUCTS_NEW_1 = MAX_DISPLAY_PRODUCTS_NEW ;

}

 

//-------------------------------------------------------------------------

Link to comment
Share on other sites

change in pdf_catalogue.php

 

//-------------------------------------------------------------------------

for($nb=0; $nb < MAX_DISPLAY_PRODUCTS_NEW; $nb++)

//-------------------------------------------------------------------------

 

with

//-------------------------------------------------------------------------

if((sizeof($products_new_array))< MAX_DISPLAY_PRODUCTS_NEW )

{

$MAX_DISPLAY_PRODUCTS_NEW_1=(sizeof($products_new_array));

}

else

{

$MAX_DISPLAY_PRODUCTS_NEW_1 = MAX_DISPLAY_PRODUCTS_NEW ;

}

for($nb=0; $nb < $MAX_DISPLAY_PRODUCTS_NEW_1; $nb++)

 

//---------------------------------------------------------

Link to comment
Share on other sites

  • 3 weeks later...

Hi,

 

I have a strange error when trying to generate a pdf catalog:

 

The script generates 6 catalogs as follows :

catalog_1.pdf

catalog_2.pdf

catalog_3.pdf

catalog_4.pdf

catalog_6.pdf

catalog_7.pdf

 

I only have a test category of items and only the first pdf file is valid ( the others are empty )

 

Also my server have PHP 3 installed so the function :

/* foreach ($foo as $key => $value)

{

     if ($foo[$key]['parent'] == $cid)

  {

       $this->Order($key, $level+1, $foo, $cid);

     }

   }

*/}

included in the pdf_catalog file is not supported and I had to comment it out.

Any suggestion on how to replace this bit of code with one suitable for php 3 ?

 

Thanks

Outside links in signatures are not allowed!

Link to comment
Share on other sites

  • 3 weeks later...

Hello everyone...

Well after lots of tweaking, I finally got it to generate the pdf. but I'm getting a repeating error:

 

Warning: getimagesize(en) [function.getimagesize]: failed to create stream: No such file or directory in /......../public_html/admin/pdf_catalogue.php on line 369

 

I've got catalogues chmod'd to 777 and all the other stuff that clint fern said to do earlier. (which did get the thing going) I've also got my images folder set to 777 and all of the images are 755.

 

But like I said it does create the catalog, however it is messed up. There is a border that wraps each image. Well, for some reason the image is showing on the right side of the document, making the border stretch all the way across causing havoc to the descriptions. Everything else works well, the descriptions, all info, and the pictures are lined up correctly with it's respective description.

 

here's the link to the file so you can see it yourself.

http://sweetnothingssugarfreeshoppe.com/ca...s/catalog_1.pdf

Thanks for your help in advance!

:listen: Musik Makin' Makes Me Mappy. . . I mean, Happy! :listen:

****Play that sax-a-ma-phone! - Homer J. Simpson****

Link to comment
Share on other sites

hi@all,

 

sorry - for postin the prob once more, but:

 

have still the FPDF-error:

FPDF error: Image file has no extension and no type was specified: images/

 

--- the history ---

i installed the V1.3 on a cvs2.2 (http://www.panasiam.de/catalog) and all worked fine... . then i`ve added the Module:

Name: Additional Images of Author: zaenal <[email protected]>

Created: February 28, 2003

 

...and the error (above) is coming... .

i put on the V1.4. - n no change... . the catalog images (2 from 1 produkt) in catalog/images are in *.jpeg format (the same error occurs with *jpg). the rest of the images in this folder are *.gif (the navigation etc.).

 

whats the prob.? any idea?

 

sorry for my bad english.

thx in advance for any help,

stephan (a hippie:)

---

THE LOVE LIVES

Link to comment
Share on other sites

hi again,

there is an additional bug: you have to put the percentage of tax in the pdf_config.php. But what if you have two different taxes on your products???

greetings

Link to comment
Share on other sites

Well that's not exactly a bug. More of a lack of a feature. This catalog script is definitely not going to do all things for all people - I'm finding it rather difficult just to produce a presentable catalog.

 

There are a couple things that I want to do that so far have given me grief. First, I want to add a cover page with an image and an explanation that this is an automatically-generated catalog (and that we have a prettier one available by mail). Second, I'm finding that there are a lot of extra spaces in my product descriptions due to HTML code in them (lists, etc.). I want to be able to clean up all that stuff and turn it into properly-formatted plain text, but I can't seem to get the script to reformat as I expect.

 

Anyone have experience with customizing output from fpdf.php scripts or have a good source of information to pass on?

Link to comment
Share on other sites

I have sucessfully installed and designed my store using osCommerce v2.2CVS. I made a back up of my site before installing the PDF Catalog script. I keep receiving these error messages:

 

In the admin section:

Warning: getimagesize() [function.getimagesize]: Read error! in /home/fbadmin/public_html/store/admin/pdf_catalogue.php on line 378 FPDF error: Image file has no extension and no type was specified: /home/fbadmin/public_html/store/images/

 

In the store section:

Warning: filesize() [function.filesize]: Stat failed for

./catalogues/catalog_1.pdf (errno=2 - No such file or directory) in

/home/fbadmin/public_html/store/pdf_catalogue_info.php on line 56

 

I have a folder called catalogues, set to 777, in the store (a.k.a catalog) directory. All of my product shots and category images are in a .jpg format. I have searched the message boards and made all of the suggested changes to no avail.

 

Could someone please assist me? Thank you in advance!

 

Kunoichi

[email protected]

Kunoichi

[email protected]

 

"The secret principle of Taijutsu is to know the foundations of peace."

Link to comment
Share on other sites

Hey there, kunoichi -

 

I wonder if there's been an update to the PDF catalog script recently that introduces this bug. A number of us have seen this error when we've had gif or other unacceptable images, but you're at least the second person who's experienced this with no gifs. You should check out this thread for a fix that bobbel posted:

 

http://www.oscommerce.com/forums/viewtopic.php?t=49804

 

My PDF catalog code is very recent, but it's different from what bobbel posted, so check yours before you try the fix (or just be prepared to change it back and try something else).

Link to comment
Share on other sites

Hi,

 

if I try to generate the catalog I only get a new blank window and after a while the browser says "Server not found".

I get no error message or an other output and no pdf file.

Link to comment
Share on other sites

hello,

 

I recently attempted to install the PDF catalog contribution, same as rest of you, and ran into a unique error message when creating the pdf catalog:

 

"FPDF error: Unsupported image file type: org/htdocs/catalog/images/"

 

Originally I go the same error message as most of you, and of course updated all of my category and product pictures to be jpg only, and yet now I receive the above message.

 

History:

 

- osCommerce 2.2-MS1

- catalogues directory is chmod 777 (also tried 775 and few others)

- all product images and category images are jpg.

 

Can anyone help? I have a client who is very adamant about getting a working pdf catalog module installed on his store. Thanks in advance!

Sincerely,

Bruce

 

19 contributions submitted

Link to comment
Share on other sites

Hello Michael!

 

I apologize for the length of time it has taken me to get back to you.

 

I did read that thread (and many others) before I posted the message. I did everything they did, to no avail. I went into the script itself (fpdf.php) and it looked like there was no definition for what the .jpg's extension is. There was for the .png though. Be aware that I am new to PHP and I do not claim to be a master by any means. Here is the code Michael:

 

function _parsejpg($file)

{

//Extract info from a JPEG file

$a=GetImageSize($file);

if(!$a)

$this->Error('Missing or incorrect image file: '.$file);

if($a[2]!=2)

$this->Error('Not a JPEG file: '.$file);

if(!isset($a['channels']) or $a['channels']==3)

$colspace='DeviceRGB';

elseif($a['channels']==4)

$colspace='DeviceCMYK';

else

$colspace='DeviceGray';

$bpc=isset($a['bits']) ? $a['bits'] : 8;

//Read whole file

$f=fopen($file,'rb');

$data=fread($f,filesize($file));

fclose($f);

return array('w'=>$a[0],'h'=>$a[1],'cs'=>$colspace,'bpc'=>$bpc,'f'=>'DCTDecode','data'=>$data);

}

 

Is there a link to a web site where I can learn to code the description myself? I like to be independent when I can but, know when to ask for help.

 

Domo arigato Michael!

 

Kunoichi

[email protected]

Kunoichi

[email protected]

 

"The secret principle of Taijutsu is to know the foundations of peace."

Link to comment
Share on other sites

I haven't messed around too much with this script yet myself, but I'm going to have to this weekend. It's working and I've customized it some, but there are some formatting issues with HTML code within the description text and I want to add a cover at the beginning and an order form at the end. I did get some image type errors at first, but they were caused by some gif category images (that I wasn't even using anymore).

 

I have some experience coding in PHP, but I find this script confusing to debug. It isn't very well commented, and it's written for programming efficiency rather than to be understood by others. So don't sweat it if you're just starting out and this one throws you - it's exceptionally difficult.

 

I did read that thread (and many others) before I posted the message. I did everything they did, to no avail. I went into the script itself (fpdf.php) and it looked like there was no definition for what the .jpg's extension is. There was for the .png though. Be aware that I am new to PHP and I do not claim to be a master by any means. Here is the code Michael:

 

function _parsejpg($file)

{

//Extract info from a JPEG file

$a=GetImageSize($file);

if(!$a)

$this->Error('Missing or incorrect image file: '.$file);

if($a[2]!=2)

$this->Error('Not a JPEG file: '.$file);

if(!isset($a['channels']) or $a['channels']==3)

$colspace='DeviceRGB';

elseif($a['channels']==4)

$colspace='DeviceCMYK';

else

$colspace='DeviceGray';

$bpc=isset($a['bits']) ? $a['bits'] : 8;

//Read whole file

$f=fopen($file,'rb');

$data=fread($f,filesize($file));

fclose($f);

return array('w'=>$a[0],'h'=>$a[1],'cs'=>$colspace,'bpc'=>$bpc,'f'=>'DCTDecode','data'=>$data);

}

 

It seems to me as if maybe the error you're getting is not due to an image not being a jpg or png, but rather that the script is not finding it at all. If you have an image with no .jpg extension somewhere in your catalog, or if you deleted an image manually that is still called in your catalog, this could happen. It could also happen if it were not finding the directory that your images are in at all.

 

I would check your pdf_config.php values and make sure that

 

define('DIR_CATALOG','/your catalog directory');

 

is correct. You may also want to try turning off images in the catalog in this line:

 

define('SHOW_IMAGES',0);

 

and see if it successfully generates the catalog without images. If it doesn't work with or without images, than the images probably aren't your problem.

 

Warning: filesize() [function.filesize]: Stat failed for 

./catalogues/catalog_1.pdf (errno=2 - No such file or directory) in 

/home/fbadmin/public_html/store/pdf_catalogue_info.php on line 56

 

This error is just the page trying to calculate the file size of the catalog (that doesn't exist, since the other script hasn't been able to create it), and returning an error when it's zero bytes. It will go away once the catalog is created properly.

 

Good luck!

Link to comment
Share on other sites

Thanks for the help Michael,

 

For the moment, I have reverted to my back up. I will play with this script later. I did manage to install the support ticket contribution from Henri so that made my spirits rise some.

 

I'm almost finshed with the site, feel free to take a look if you like. It's nothing special: http://www.fitbaskets.com. I've disabled all of the payment modules at the moment.

 

Domo arigato!

Kunoichi

[email protected]

 

"The secret principle of Taijutsu is to know the foundations of peace."

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.
Note: Your post will require moderator approval before it will be visible.

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...