Loading

Author Topic: print the item  (Read 1550 times)

ferdgua

  • Jr. Member
  • **
  • Posts: 86
Re: print the item
« Reply #60 on: January 13, 2012, 07:54:12 pm »
Hi
 I stayed away from this forum and I am sorry not having taken part in this discussion, which I am the cause.
 I was trying to do something with java and html, but these results are excellent. Thanks _CONEJO.

....after same days....


I'm not a php programmer, I made some changes to the attached file.
 Sorry if I was not polite.
 now:
 The logo is larger
 The price displays €
 you can write àèòùì
 Email is only visible if the user chooses to make it visible.
 Show the first line of the custom field, it is the phone for me ...

 I hope this can helps

you can see the result to skambio.it



ONLY a strange thing...you can print normaly? the visualization on pc is normal, but the printed paper is very strange.
« Last Edit: January 18, 2012, 09:58:07 pm by ferdgua »

_CONEJO

  • Administrator
  • Hero Member
  • *****
  • Posts: 1733
Re: print the item
« Reply #61 on: January 20, 2012, 02:00:41 pm »
Hi,

I uploaded a new version of the plugin. I didn't fully test it but it should work as before.

Changes : I replace fpdf with a more modern library (tcpdf) which is basically the same, but maintained. So, codification problems should have disappeared (strange characters)

Known bugs : HTML content could not be limited in size nor know how many text there are. So, no HTML content is displayed on description (sorry for that, I could not do that, I even try to modify the library but it will waste so many resources that it's not worthy.)


Download : https://sourceforge.net/projects/osclass/files/Plugins/printpdf/?
Version 1.2

akapar

  • Premium
  • Full Member
  • *****
  • Posts: 132
Re: print the item
« Reply #62 on: January 25, 2012, 04:04:07 pm »
Hi conejo,

This is a very nice plugin, I wish it also worked for Arabic :-) The PDF file displays ????? instead of Arabic characters. I would appreciate if you can add support for Arabic in the next versions of the plugin.

_CONEJO

  • Administrator
  • Hero Member
  • *****
  • Posts: 1733
Re: print the item
« Reply #63 on: January 25, 2012, 05:29:13 pm »
Hi akapar, could you help me out with this?

Modify oc-content/plugins/printpdf/template.php


On top of the file change

require_once('tcpdf/config/lang/eng.php');



to


require_once('tcpdf/config/lang/ara.php');



Also, on the same file change every "helvetica" to "aefurat" (this is the font, and should appear on SetFont("helvetica",.... I think that with those changes should "work". If that is "OK" for you, then, I will change the layout (orientation of text, margins,...) to fit completely to a rtl text style.

Thanks

akapar

  • Premium
  • Full Member
  • *****
  • Posts: 132
Re: print the item
« Reply #64 on: January 25, 2012, 06:21:26 pm »
Hi conejo,

your suggestion works perfectly fine. the only other requirement is to make the output right to left rather than left to right. is there a way to also customize this?

regards,

akapar

05suq.com

Swede

  • Super Moderator
  • Sr. Member
  • *****
  • Posts: 356
Re: print the item
« Reply #65 on: January 25, 2012, 06:29:23 pm »
Hello, Conejo!

It works fine now with the characters!

Some issues as you can se at the attached pic.
And it would be nice if the pdf opened in a new window.

_CONEJO

  • Administrator
  • Hero Member
  • *****
  • Posts: 1733
Re: print the item
« Reply #66 on: January 25, 2012, 06:40:26 pm »
Hi akapar,

I need to prepare a right to left template. There's no other option.


Hi Swede,

I will look to the first bug (justified text on the de-attachable pieces).

The other you asked for ar QR Codes ( http://en.wikipedia.org/wiki/QR_code ) they will be optional on next version. You can scan the QR Codes with your smartphone and they will direct you to the webpage of the ad.

Thanks

Swede

  • Super Moderator
  • Sr. Member
  • *****
  • Posts: 356
Re: print the item
« Reply #67 on: January 26, 2012, 03:48:48 am »
one more:

Telephone number (extra field) is in my oppinion very important, because if you are putting these posters up it means that you want to advertise your item to people that, in many cases, dont have internet.... so the telephone number is important!
« Last Edit: January 26, 2012, 03:51:22 am by Swede »

_CONEJO

  • Administrator
  • Hero Member
  • *****
  • Posts: 1733
Re: print the item
« Reply #68 on: January 26, 2012, 12:35:11 pm »
Great idea Swede!

Swede

  • Super Moderator
  • Sr. Member
  • *****
  • Posts: 356
Re: print the item
« Reply #69 on: January 26, 2012, 04:18:36 pm »
Hmm... im trying to translate the button "Download pdf" to Swedish... i cant find where to do that...

Edit: I downloaded Textcrawler and found it! What a nice little program...
« Last Edit: January 26, 2012, 06:53:42 pm by Swede »

bilekas

  • Full Member
  • ***
  • Posts: 210
  • Bilekas
    • Bilekas
Re: print the item
« Reply #70 on: January 27, 2012, 10:00:40 pm »
Im surprised that i think i am the only one who has problems with this plugin..

On line 62 on index.php

Code: [Select]
        echo '<a href="'.osc_base_url().'oc-content/plugins/'.osc_plugin_folder(__FILE__).'/download.php?item='.osc_item_id().'" class="printpdf_link" >'.__('Download PDF', 'printpdf').'</a>';

Should be :
Code: [Select]
        echo '<a href="'.osc_base_url().'oc-content/plugins/'.osc_plugin_folder(__FILE__).'download.php?item='.osc_item_id().'" class="printpdf_link" >'.__('Download PDF', 'printpdf').'</a>';

as to remove the double / before download..

I am ALSO havig a problem with the download..

 Just getting redirected to the homepage with the url indicating it is trying to download  :
/oc-content/plugins/printpdf/download.php?item=4

Permissions are correct, .htaccess is perfect and even tested while removing it. Hosting is fully open.. Im at a loss here to see any problem.. I have tried all versions of the plugin.. No joy..




_CONEJO

  • Administrator
  • Hero Member
  • *****
  • Posts: 1733
Re: print the item
« Reply #71 on: January 27, 2012, 10:03:59 pm »
Hi Bilekas,

I will investigate the issue. It's strange.

A few questions:
Is permalinks enabled?
Is mod "negociation" enabled in apache?

Thanks

bilekas

  • Full Member
  • ***
  • Posts: 210
  • Bilekas
    • Bilekas
Re: print the item
« Reply #72 on: January 27, 2012, 10:44:27 pm »
Hi Conejo,

 I ahve disabled and enable the permalinks, edited the .htaccess also to allow for multiview, = 404

 negotiation is enabled on apache also..

 Example of it is here : http://bilekas.com/usa/for-sale/animals/test-ite_2 - just above the contact form.

 im confused myself because there is no error on the logs about it at all!

 

Swede

  • Super Moderator
  • Sr. Member
  • *****
  • Posts: 356
Re: print the item
« Reply #73 on: January 28, 2012, 03:32:26 am »
I could add that i could not upload this plugin via the admin, i had to uppload the files directly to pluginfolder via ftp... i think it is due to the size of the zip.
maybe it did not get fully uploaded for you bilekas?

ferdgua

  • Jr. Member
  • **
  • Posts: 86
Re: print the item
« Reply #74 on: January 28, 2012, 02:51:32 pm »
@swede I solved the problem of the phone, changing the second version of the plugin and enter the phone as the first custom field.
  I'm not as elegant as _conejo, I'm not a real programmer, I was a graphic
 You can find the post on top of this page



@_conejo
The pdf files in the directory "uploads / printpdf" on the server.   should they remove themselves?
« Last Edit: January 28, 2012, 03:19:58 pm by ferdgua »