Jump to content
  • Checkout
  • Login
  • Get in touch

osCommerce

The e-commerce.

PDF Catalog v.1.5


Recommended Posts

Goran,

 

Something went wrong when you added the link to your PDF catalog files ... post the content of both files in here please!!

 

 

Alfaowner,

 

Are you on a shared server? Do you have the possibility to use the php function set_time_limit() ?? It's the only thing we could try, even if I don't know for the moment how to use it exactly! :-)

 

Antonios

Antonios

 

olympicslogo_en.gif

Link to comment
Share on other sites

  • Replies 504
  • Created
  • Last Reply

Top Posters In This Topic

Antonios:

Now My catalog working just fine but the images are de-pixilated. Is there are any settings for image resolution? Thanks for wonderful contribution!

Goran

Link to comment
Share on other sites

Goran:

 

- It's not my contribution, I just added some few things to make it suit to my needs! :ph34r:

 

- Do you have a link to the generated PDF catalogs with the pixelized images and the link problems?

 

Antonios

Edited by detsouvalas

Antonios

 

olympicslogo_en.gif

Link to comment
Share on other sites

If you want increase this contribution you can add this code :

 

near 692

 ?	$model=rtrim(strip_tags($products_new_array[$nb]['model']));
// ################ added <br> ###############
// $description=rtrim(strip_tags($products_new_array[$nb]['description'])); 
$description= str_replace(" ","",rtrim(strip_tags($products_new_array[$nb]['description']))); 
// ################ End added <br> ###############

 

If you have in your HTML code <p> or <br>, the new pdf can take it.

 

near 724

 function TitreChapitre($lib)
{
   //Titre
   $this->SetFont('Arial','',12);
   $titles_color_table=explode(",",HIGHT_TITLES_CELL_COLOR);
   $this->SetFillColor($titles_color_table[0], $titles_color_table[1], $titles_color_table[2]);
   $this->Cell(0,6,$lib,0,1,'L',1);
   $this->Ln(4);
   //Sauvegarde de l'ordonn?e
   $this->y0=$this->GetY();
}

// ################# Imprimer la couverture #################
function CouvertureFace()
{
$this->AddPage();
//	$this->Image('logo.gif',5,60,200);
$this->SetY(-180);
$this->SetFont('Arial','B',30);
$this->SetTextColor(0);
$this->Cell(80);
$this->Cell(30,10,PDF_TITLE,0,0,'C');
$this->Ln(20);
}

// ##################### End Added ##############


}



$languages = tep_get_languages();

$languages_string = '';

for ($i=0; $i<sizeof($languages); $i++)
{
$pdf=new PDF();
$pdf->Open();
$pdf->SetDisplayMode("real");
// ##################### Imprimer la couverture ##############
$pdf->CouvertureFace();
// ##################### End Added ##############

 

create a new first presentation page. It's really interesting.

 

you can see this contribution in action on http://www.bleu-lavande.com

 

It's not perfect for the moment.

Edited by Gyakutsuki


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

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

 

Link to comment
Share on other sites

If you have in your HTML code <p> or <br>, the new pdf can take it.

 

If you are looking for a way for the script to handle HTML tags, I would propose to have a look on the Scripts section of fpdf.org site. You will find there many interesting ways to enhance the fpdf class!

Antonios

 

olympicslogo_en.gif

Link to comment
Share on other sites

Fatal error: Call to a member function on a non-object in /var/www/shop/admin/pdf_fpdf.php on line 1592

 

Someone an idea how to fix this?!

 

Thanks!

Hmmm, 'cause some reason I can't edit my own post ... So I'll add more this way..

 

Here is what's on line 1592 ...

 

$bgColor = $this->m_img->m_gih->m_colorTable->colorIndex($bgColor);

 

Greetz.

Link to comment
Share on other sites

hello everybody

 

I have freshly installed the multi store contribution and I want to know if the pdf catalog work fine with the multistore.

 

Because I have three different shops having the same DB and I think that pdf catalog contribution do not make difference between the various stores.

 

How is it possible that it makes this difference between the various stores and then have three or more pdf catalogs.

 

thanks in advance

Poor english

Link to comment
Share on other sites

I have freshly installed the multi store contribution and I want to know if the pdf catalog work fine with the multistore.

 

I haven't installed the multi-stores contribution, I just read the instructions a few moments ago and I feel that the answer to your question is ...

no, the script hasn't been designed for such a use!

But, as PDF Catalog is database driven, it should be possible to implement with a bit of further coding, you have to find out how the rest of oscommerce makes the difference between shops and implement the same logic to the script!

Antonios

 

olympicslogo_en.gif

Link to comment
Share on other sites

I try to develop an "html" pdf catalog. I would to take <b>,<p>,<br>.

But i don't arrive to create this. could you help.

 

The example below does'nt wok very well.


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

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

 

Link to comment
Share on other sites

I try to develop an "html" pdf catalog. I would to take <b>,<p>,<br>.

But i don't arrive to create this. could you help.

 

I will try ...

 

Have you checked the www.fpdf.org site?

If not, download this file and add it to you osC+PDF_Catalog installation! With a little bit of luck, this is what you are looking for ... if not ... Houston we have a problem! :-)

Antonios

 

olympicslogo_en.gif

Link to comment
Share on other sites

Hiya Antonios

 

I have installed the contribution PDF Catalogs v.1.51. Everytime i try and generate the PDF i keep getting this error:

 

FPDF error: Unsupported image file type: bmp

File : /content/StartupHostPlus/c/o/www.computek2000.co.uk/web/catalog/images/untitled.bmp

 

I have checked the above directory and deleted the untitled.bmp from catalogs/images, but i still get the same error everytime i generate the PDF.

 

Any help would be greatly appreciated!!

 

Cheers

 

Jub

Link to comment
Share on other sites

What was the use of this untitled.bmp image file? Was it a product image that you have inserted in the database, was it a category image, what was it for?? If it was a product image, have you also changed the filename in the database?

Antonios

 

olympicslogo_en.gif

Link to comment
Share on other sites

Hiya

 

Ive sorted out the bmp problem, but now im getting this:

 

Warning: fopen(/content/StartupHostPlus/c/o/www.computek2000.co.uk/web/catalog/catalogues/catalog_1.pdf): failed to open stream: No such file or directory in /content/StartupHostPlus/c/o/www.computek2000.co.uk/web/catalog/admin/pdf_fpdf.php on line 1048

FPDF error: Unable to create output file: /content/StartupHostPlus/c/o/www.computek2000.co.uk/web/catalog/catalogues/catalog_1.pdf

 

This is from line 1047-1049:

 

//Save to local file

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

if(!$f)

 

Any ideas?

 

Jub

Link to comment
Share on other sites

ahhhhhh, ive sorted it!! had the catalogues folder in the wrong place!

 

Is there a way of changing the size of the PDF created? As mine is 7mb!

 

Also ive noticed on the Download PDF Catalog page that where it says:

 

With free Acrobat Reader? software, you can view and print Adobe PDF files.

If you don't have it, get it here:

 

There is no image displayed, and obviously no link to the acrobat program. Ive noticed this on sites too.

 

Maybe you could look at it Antonios?

 

Cheers

 

Jub

Link to comment
Share on other sites

Hiya

 

Ive now got my PDF catalog, all 350 pages!! lol

 

Anyway, the prices shown in the catalog are in Euro`s?!? How is this when the default currency on the site is British Pounds??

 

Is there a way to change this anywhere?

 

Also I would like to change the `OsCommerce` title on every page of the catalog with either my logo or text, can this be done? If so where?

 

Cheers

 

Jub

Link to comment
Share on other sites

Also I have noticed that when i click on an image in the PDF catalog to open the url of the product, it doesnt work.

 

What file and where do you edit to rectify this?

 

Example:

 

http://www.computek2000.co.ukDIR_CATALOGpr...566&language=en

 

obviously there is a broken link in a php file for the PDF catalog generator, just need to know which file has this info in it.

 

I have sorted out the currency and put my own logo on each page, just need to now edit the file with the error (which one i dont know) and edit the following line so that the getacro.gif displays on the pdf_catalog_info page:

 

<tr>

<td class="main" align="center"><?php

echo '<a href="http://www.adobe.com/products/acrobat/readstep2.html" target="_blank">';

echo tep_image(DIR_WS_IMAGES . 'getacro.gif');

?></a></td>

 

 

Also is it possible so that customers can download a zipped version of the catalog? I know you can put it in the downloads section, but is it possible for them to `download` it from the pdf_catalog_info page, instead of having to wait for it to load in a new window?

 

Any advice?

 

Cheers

 

Jub

Edited by Jub
Link to comment
Share on other sites

Anyway, the prices shown in the catalog are in Euro`s?!? How is this when the default currency on the site is British Pounds??

Also I would like to change the `OsCommerce` title on every page of the catalog with either my logo or text, can this be done? If so where?

 

Edit the catalog/admin/pdf_config.php file ... that's where you can make all settings regarding the PDF file generation and content!

 

Also I have noticed that when i click on an image in the PDF catalog to open the url of the product, it doesnt work.

What file and where do you edit to rectify this?

 

Edit the catalog/admin/pdf_catalogue.php file ... around line 349 find the following IF statement

 

if(SHOW_PRODUCTS_LINKS)
?{ 
?	$link=HTTP_CATALOG_SERVER.DIR_CATALOG."product_info.php?products_id=".$data_array[10]."&language=".$data_array[11];
?}

 

and change DIR_CATALOG to DIR_WS_CATALOG and the problem should be fixed (if nothing goes wrong with the slashes!!) B) This fix will be included in the next version of the script!

 

Also is it possible so that customers can download a zipped version of the catalog?

 

Downloading such a file from the 'Download Catalog' page is not difficult at all, but creating it through the site with PHP that is my concern ... let me check it during the long weekend! Same for the Get Acro image not displaying, I have to fix my test site before trying anything else!! :D

 

Regards,

 

Antonios

Edited by detsouvalas

Antonios

 

olympicslogo_en.gif

Link to comment
Share on other sites

Cheers Ant, got the links working from within the catalog.

 

Hope you have time to look at the zip format and getacro.gif image!

 

Cheers

 

Jub

Link to comment
Share on other sites

I try to develop an "html" pdf catalog. I would to take <b>,<p>,<br>.

But i don't arrive to create this. could you help.

 

I will try ...

 

Have you checked the www.fpdf.org site?

If not, download this file and add it to you osC+PDF_Catalog installation! With a little bit of luck, this is what you are looking for ... if not ... Houston we have a problem! :-)

Yes i know this site and i try to implement the code, but my knwoledge are limited and all my modification are bad.

 

this contribution is not very simple.


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

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

 

Link to comment
Share on other sites

Again, since no-one wants to reply (or just no-one has the problem / solution) on my previous question, i'll repost it::

 

Fatal error: Call to a member function on a non-object in /var/www/shop/admin/pdf_fpdf.php on line 1592

 

Someone an idea how to fix this?!

 

Thanks!

 

 

PS.

Here is what's on line 1592 ...

 

$bgColor = $this->m_img->m_gih->m_colorTable->colorIndex($bgColor);

 

Greetz.

Link to comment
Share on other sites

Again, since no-one wants to reply (or just no-one has the problem / solution) on my previous question, i'll repost it::

 

Well, I don't think that it's a question of wanting or no to reply, but rather of having no answer!! :-(

The line you quote is part of the GIF parser, which is an unofficial extension of the fpdf class, so unfortunately no support is available!

Change your images to a free image format like JPG or PNG! :-)

(Sorry, I have no other idea for the moment!!)

Antonios

 

olympicslogo_en.gif

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