Jump to content
detsouvalas

PDF Catalog v.1.5

Recommended Posts

Hi!

 

I just uploaded a small upgrade of the PDF Catalog contribution.

 

Here's the list of the changes:

- Upgraded FPDF Class to FPDF v.1.52 released 2003-12-30,

- Added partial GIF support to the Contribution,

- Added background color to generated PDF files,

- Adapted the administration page to osCommerce template,

- Changed a bit the page displayed in the osCommerce catalog.

 

I hope it works for you as well! ;)

 

The new version can be found here:

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

 

Old forum posts regarding PDF Catalog:

http://forums.oscommerce.com/index.php?showtopic=49804&st=0

http://forums.oscommerce.com/index.php?showtopic=35851&st=0

Edited by detsouvalas

Antonios

 

olympicslogo_en.gif

Share this post


Link to post
Share on other sites

A little error on pdf_catalogue. You have forget a ].



Regards
-----------------------------------------
Loïc

Contact me by skype for business
Contact me @gyakutsuki for an answer on the forum

 

Share this post


Link to post
Share on other sites

i uploaded it and get this error on the catalog side of my site when i click the pdf catalog link

 

Warning: filesize(): Stat failed for pdf_catalogs/rainflower_1.pdf (errno=2 - No such file or directory) in /home/xxxx/public_html/pdf_catalogue_info.php on line 71
pdf_catalogs/rainflower_1.pdf (0.00 Mo)

 

i'm not good at all with php, so any help is appreciated :)

Share this post


Link to post
Share on other sites
A little error on pdf_catalogue. You have forget a ].

 

Could you please give me some more details? Who? Where? What?

 

Thanx in advance!

 

 

i uploaded it and get this error on the catalog side of my site when i click the pdf catalog link

 

Sorry, I forgot to undo some hardcoded customizations!! :unsure:

 

I will upload the fixes! Thanx for your patience!


Antonios

 

olympicslogo_en.gif

Share this post


Link to post
Share on other sites
Warning: filesize(): Stat failed for pdf_catalogs/rainflower_1.pdf (errno=2 - No such file or directory) in /home/xxxx/public_html/pdf_catalogue_info.php on line 71

pdf_catalogs/rainflower_1.pdf (0.00 Mo)

 

I had the same problem.

 

1. Rename the directory you created under /catalog/ from "catalogues" to "pdf_catalogs"

 

2. Open catalog/admin/pdf_config.php

 

Go to around line 29 and change

 

define('DIR_WS_PDF_CATALOGS','../catalogues/');

 

to

 

define('DIR_WS_PDF_CATALOGS','../pdf_catalogs/');

 

3. Go to your Admin panel. Select Tools => Generate catalog. This will generate catalogs in your /pdf_catalogs/ folder. The default is osCommerce_1.pdf, osCommerce_2.pdf, etc.

 

4. Open catalog/pdf_catalogue_info.php.

 

Line 70 should look like this:

 

$file = "pdf_catalogs/rainflower_" . $languages_id . ".pdf";

 

change it to:

 

    $file = "pdf_catalogs/osCommerce_" . $languages_id . ".pdf";

 

You can change the prefix of your pdf catalogs by going to catalog/admin/pdf_config.php and changing line 35, which is currently:

 

  define('PDF_FILENAME','osCommerce');

 

Change the osCommerce to what suits you and put the same value in the change on step 4.

 

Line 375 in catalog/admin/pdf_catalogue.php should be

 

$heightwidth=getimagesize($data_array[12]);

 

 

One question I have is why does it generate 3 .pdf files through admin and only display one to download?

 

Carla

Share this post


Link to post
Share on other sites

im getting errors on gifs...

 

FPDF error: GIF parser: unable to open +path_to_file_name"

 

Any ideas?

Share this post


Link to post
Share on other sites

Also, I tried turning Resize Images off and on to no avail....

 

 

FROM README.TXT

>> KNOWN ISSUES:

 

If you are using GIF files, setting in the configuration the 'Resize images'

option to '1' (1 = yes) will generate an error!

Share this post


Link to post
Share on other sites

Hello,

 

I have the error below when I try to generate the PDF file :

 

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

 

Can someone help me ?

 

Thanks in advance

Share this post


Link to post
Share on other sites

Hey there,

Have the above bugs/errors been taken care of with a patch yet? I'd love to install this, but since I know no PHP, I wouldn't be able to de-bug it if it didn't work out.

 

Thanks!

BD

 

;)

Share this post


Link to post
Share on other sites

Johnny,

 

I didn't run into that error when I installed is and I'm not a php expert, so I really couldn't tell you what is causing it. Hopefully the author of the contribution will be able to help you.

 

Smevo,

 

I found a similar post in another thread on an older version.

 

hi we had a similar problem, it was that it did not support .bmp files - only liked .jpg files - also did not like any image name with a space in it. We now have a problem in that we have corrected all the images but it does not handle a large number of products and times out.. good luck

 

BoulderDash,

 

The contribution is working for me now that I made the changes in my previous post. I haven't installed any contributions that modify the product images, so maybe that is why I'm not running into the problems that other people have.

 

The contribution is pretty compartmentalized. If you installed it and it didn't work, you could just remove the "Download Catalog" link from your information page on the storefront until you resolved the issues and it wouldn't affect anything else.

 

Carla

Share this post


Link to post
Share on other sites

Hello everybody!

 

Well, as I don't want to upload another version in the contribution's area before it is tested by others, you can download an updated version of PDF Catalogs from here. If I get no feedback about errors, I will upload it in the contribution's area on Sunday!

 

The filename and the directory issues should have been settled, you can configure them as you like in the pdf_config.php and in the pdf_catalogue_info.php files.

 

Line 375 in catalog/admin/pdf_catalogue.php should be

$heightwidth=getimagesize($data_array[12]);

 

This issue, also posted in older forum posts, was beyond the first ones that was addressed, I ckecked again the code and it seems OK to me! :unsure:

 

One question I have is why does it generate 3 .pdf files through admin and only display one to download?

 

The script generates one PDF file for each installed language and displays in the shop the link to the file matching the current language.

 

FPDF error: GIF parser: unable to open +path_to_file_name

 

Well that one seems to be an error in the GIF extension of FPDF Class, I am not the auther of the above mentionned class, but I will have a look in the fpdf.org forum and see if a can find any clues ... !

 

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

 

This error used to appear when images where not of the right format!

Supported image formats are JPG, PNG and (partially) GIF.

 

I also wanted to say I am sorry for not informing the author of the PDF Catalog script about the modifications I made ... ! :ph34r:

Edited by detsouvalas

Antonios

 

olympicslogo_en.gif

Share this post


Link to post
Share on other sites

Dear,

thanks for your pdf catalog's contribute. I've one question for you.

Is possible add to end of catalog also option values (order by categories)?

 

Example:

 

--+------------------------------------+-----------------

CATEGORIE a

--+------------------------------------+-----------------

| PRODUCT NAME x PRICE

--+------------------------------------+-----------------

1 Name Option 1 + 5,00 $

--+------------------------------------+-----------

2 Name Option 2 + 12,00 $

--+------------------------------------+-----------

3 Name Option 3 + 7,00 $

--+------------------------------------+-----------

| PRODUCT NAME y PRICE

--+------------------------------------+-----------

1 Name Option 1 + 3,00 $

--+------------------------------------+-----------

2 Name Option 2 + 56,00 $

--+------------------------------------+-----------

3 Name Option 3 + 32,00 $

--+------------------------------------+-----------

ecc.

--+------------------------------------+-----------

 

 

 

--+------------------------------------+-----------

CATEGORIE b

--+------------------------------------+-----------

| PRODUCT NAME k PRICE

--+------------------------------------+-----------

1 Name Option 1 + 3,00 $

--+------------------------------------+-----------

2 Name Option 2 + 56,00 $

--+------------------------------------+-----------

3 Name Option 3 + 32,00 $

--+------------------------------------+-----------

ecc.

--+------------------------------------+-----------

 

 

 

Thanks.

Share this post


Link to post
Share on other sites

Hello!

 

Just to make one thing clear, the author of PDF_Catalog Contribution was Mr. Gurvan Riou, I just make some modifications based on my needs and on certain old forum messages! :)

 

Is possible add to end of catalog also option values (order by categories)?

 

I suppose that one can add almost everything saved in the database! Wouldn't it be more suitable to add the options underneath the product??

 

BTW, have you tried the latest version? Did you had any problems (whatever, installation, writing errors, .... everything!)?


Antonios

 

olympicslogo_en.gif

Share this post


Link to post
Share on other sites

OK, I received no feedback about other bugs, so I uploaded the whole fixed package!

 

Enjoy ... and start thinking on possible improvements! ;)

 

Antonios


Antonios

 

olympicslogo_en.gif

Share this post


Link to post
Share on other sites

Does anyone know how to get the images to be proportionate? All of my images get stretched. I?ve tried changing the maximum width and height for the images but to no avail.

Share this post


Link to post
Share on other sites

Hello,

if some images files are not present the pdf generation hangs,

 

I have added the:

 

if (is_file("$data_array[12]")) {

 

before line 369 in pdf_catalogue.php to fix this

 

here is the code:

 

if (is_file("$data_array[12]")) {
$heightwidth=getimagesize($data_array[12]);
$data_array[0]=$data_array[0];
$data_array[1]=$heightwidth[1]*PDF_TO_MM_FACTOR;
$this->ShowImage($data_array[0],$data_array[1],$link,$data_array[12]);
$y1=$this->GetY();
}

 

Ciao!

Share this post


Link to post
Share on other sites

Has anyone tried this on a large store?

 

I have 4,000 products, images for 2,000 of them, and used a shared server...

Share this post


Link to post
Share on other sites

i get this each time:

 

Fatal error: Maximum execution time of 30 seconds exceeded in /home/alfaow/public_html/store/admin/pdf_gif.php on line 164

Share this post


Link to post
Share on other sites

btw, i have gifs and have used the 0 and 1 setting. where would i find a php ini and will that help? (im on a dedicated server )

 

Any help appreciated

Share this post


Link to post
Share on other sites
Fatal error: Maximum execution time of 30 seconds exceeded in /home/alfaow/public_html/store/admin/pdf_gif.php on line 164

 

How many products do you have?

What's the average size of your images?

How many languages do you have?

 

This script needs time to execute and compile the PDF file. PHP allows by default each script a maximun execution time of 30 seconds.

You can change this setting somewhere in the php.ini, but I don't know where this file is on your server, don't you have a search file function available??

Before changing this setting, please read the PHP documentation and understand what such a change implies for your system!


Antonios

 

olympicslogo_en.gif

Share this post


Link to post
Share on other sites

Hi-

 

When generating, Im still getting this...

 

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

 

I uploaded v.151 and Im still getting errors. I dont have anything in the /images dir besides jpegs and gifs.

 

Anyone else?

Share this post


Link to post
Share on other sites
Fatal error: Maximum execution time of 30 seconds exceeded in /home/alfaow/public_html/store/admin/pdf_gif.php on line 164

 

How many products do you have?

What's the average size of your images?

How many languages do you have?

 

This script needs time to execute and compile the PDF file. PHP allows by default each script a maximun execution time of 30 seconds.

You can change this setting somewhere in the php.ini, but I don't know where this file is on your server, don't you have a search file function available??

Before changing this setting, please read the PHP documentation and understand what such a change implies for your system!

Hi there,

 

firstly, thanks for rersponding, I have only 800 products and my image sizes are actually very low, avergare seems to be 15kb.

 

I click build pds etc.... it appears to be working, then just times out.

 

I have a mixture of gifs and jpg images btw.

 

thanks you again

Share this post


Link to post
Share on other sites

Hello everyone, I just uploaded the module pdf_catalog v1.51 and I did all steps that needed but the error on a admin/tool page appears

 

Parse error: parse error, unexpected '}' in /usr/local/psa/home/vhosts/mediaversion.com/httpdocs/catalog/admin/includes/boxes/tools.php on line 34

 

 

also on catalog/

Parse error: parse error, unexpected T_NEW in /usr/local/psa/home/vhosts/mediaversion.com/httpdocs/catalog/includes/boxes/information.php on line 28

 

Any help I would appreciate very much

Goran

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

×