Post by mondy » Sun Jan 17, 2010 6:56 am

B"h

the PDF file has been updated since Oct 2010, please see:

http://forum.opencart.com/viewtopic.php ... 20#p103264

Mo


Zip file is added. Unzip the file.

Upload the external directory to youre (open-cart-1.4-root)/sytstem dir.

Replace system/engine/controller.php
Replace admin/controller/sale/order.php

EDIT order,pdf -> renderPDF() and CHANGE youre parameters lines 89-93
EDIT external/tcpdf/tcpdf/config/tcpdf_config.php and CHANGE youre parameters lines 126-136

Go to administration panel -> sale -> edit order -> print invoice

You will get the invocie as PDF

Mo.

Attachments

all files you need for using PDF invoice with Open Cart v1.4

Last edited by mondy on Thu Dec 23, 2010 4:37 pm, edited 2 times in total.

New member

Posts

Joined
Tue Nov 11, 2008 8:01 am

Post by Miguelito » Sun Jan 17, 2010 11:35 pm

mondy, have you tried barcode with your mod?

The Finnish OpenCart Forum
"Real programmers don't document. If it was hard to write, it should be hard to understand."


Active Member

Posts

Joined
Sun Jan 10, 2010 10:11 pm

Post by mondy » Mon Jan 18, 2010 12:56 am

Miguelito wrote:mondy, have you tried barcode with your mod?
b"h

Try this files with barcode (Zip file is added).
EDIT controller.php -> renderPDF() lines 131-151 to set youre barcode type.

For more information see TCPDF example 27 at:
http://www.tecnick.com/public/code/cp_d ... f_examples

Mo

Attachments

All files to set PDF invoice with barcode


New member

Posts

Joined
Tue Nov 11, 2008 8:01 am

Post by Miguelito » Mon Jan 18, 2010 2:24 am

So this only prints admin invoices in pdf? Customers get their invoices in html format?

The Finnish OpenCart Forum
"Real programmers don't document. If it was hard to write, it should be hard to understand."


Active Member

Posts

Joined
Sun Jan 10, 2010 10:11 pm

Post by mondy » Mon Jan 18, 2010 3:19 am

b"h

Curentlly, only admin can print PDF invoices.

I have this mode also in OpenCart v1.3.2 that send the order by mail as PDF file, and/or save it to the server.

In this way, I'm using also another program, that print automaticly the order from the mail, so I can get the order directly to my printer without openning the opencart site.

Maybe later, I'll set it also to OpenCart v1.4.

Mo

New member

Posts

Joined
Tue Nov 11, 2008 8:01 am

Post by Donce » Mon Jan 18, 2010 4:31 am

hello everybody,

i get this error..
TCPDF ERROR: Could not include font definition file: helvetica
wonder why/?

New member

Posts

Joined
Fri Aug 28, 2009 8:22 pm

Post by mondy » Mon Jan 18, 2010 4:47 am

b"h

You don't have this font, in youre tcpdf/fonts directory, includedin zip file that I added.
you have to use the font 'dejavusans'.

Change the controller.php about line 141 :
instead of --> 'font' => 'helvetica',
change it to ---> 'font' => 'dejavusans',

it has to work.

Mo

New member

Posts

Joined
Tue Nov 11, 2008 8:01 am

Post by Donce » Mon Jan 18, 2010 3:37 pm

Excelent mod.

New member

Posts

Joined
Fri Aug 28, 2009 8:22 pm

Post by allenshea » Mon Jan 18, 2010 4:06 pm

thanks for this.

I know nothing about PHP and SQL, but I still try my best to understand it.


Active Member

Posts

Joined
Mon Dec 14, 2009 10:01 pm

Post by Miguelito » Tue Jan 19, 2010 4:50 pm

Tax class value doesn't appear in the pdf as default. Should it?

The Finnish OpenCart Forum
"Real programmers don't document. If it was hard to write, it should be hard to understand."


Active Member

Posts

Joined
Sun Jan 10, 2010 10:11 pm

Post by Miguelito » Tue Jan 19, 2010 5:14 pm

Forget my last comment... my mistake ;)

The Finnish OpenCart Forum
"Real programmers don't document. If it was hard to write, it should be hard to understand."


Active Member

Posts

Joined
Sun Jan 10, 2010 10:11 pm

Post by espc » Thu Feb 11, 2010 9:03 pm

I changed font to dejavusans but it still says TCPDF ERROR: Could not include font definition file: helvetica
why?

God, give me courage to do what I can,
humility to admit what I can't,
and wisdom to know the difference.

Opencart mods (search suggestions and so on):
http://forum.opencart.com/viewtopic.php?p=71588#p71588" onclick="window.open(this.href);return false;


User avatar
Active Member

Posts

Joined
Fri Dec 04, 2009 12:40 am

Post by espc » Thu Feb 11, 2010 10:01 pm

does not work...

God, give me courage to do what I can,
humility to admit what I can't,
and wisdom to know the difference.

Opencart mods (search suggestions and so on):
http://forum.opencart.com/viewtopic.php?p=71588#p71588" onclick="window.open(this.href);return false;


User avatar
Active Member

Posts

Joined
Fri Dec 04, 2009 12:40 am

Post by dramony » Tue Feb 16, 2010 4:37 pm

will this work on 1.3.2?

I am planning to print the product inventory, can i use this by converting the inventory first to PDF?

Thanks.

User avatar
Active Member

Posts

Joined
Sat Oct 24, 2009 12:34 pm

Post by espc » Tue Feb 23, 2010 6:34 am

does not work

God, give me courage to do what I can,
humility to admit what I can't,
and wisdom to know the difference.

Opencart mods (search suggestions and so on):
http://forum.opencart.com/viewtopic.php?p=71588#p71588" onclick="window.open(this.href);return false;


User avatar
Active Member

Posts

Joined
Fri Dec 04, 2009 12:40 am

Post by MulderDSM » Wed Feb 24, 2010 9:04 am

After changing font from Helvetica, I got pass that error and now get:


Warning: Unexpected character in input: ''' (ASCII=39) state=1 in /homepages/38/d250681588/htdocs/tojada/store/system/external/tcpdf/tcpdf.php on line 12110

Parse error: syntax error, unexpected $end in /homepages/38/d250681588/htdocs/tojada/store/system/external/tcpdf/tcpdf.php on line 12110

New member

Posts

Joined
Sat Feb 20, 2010 9:57 pm

Post by espc » Wed Feb 24, 2010 3:20 pm

me too

God, give me courage to do what I can,
humility to admit what I can't,
and wisdom to know the difference.

Opencart mods (search suggestions and so on):
http://forum.opencart.com/viewtopic.php?p=71588#p71588" onclick="window.open(this.href);return false;


User avatar
Active Member

Posts

Joined
Fri Dec 04, 2009 12:40 am

Post by espc » Mon Mar 01, 2010 9:16 pm

updates?

God, give me courage to do what I can,
humility to admit what I can't,
and wisdom to know the difference.

Opencart mods (search suggestions and so on):
http://forum.opencart.com/viewtopic.php?p=71588#p71588" onclick="window.open(this.href);return false;


User avatar
Active Member

Posts

Joined
Fri Dec 04, 2009 12:40 am

Post by silanli_53 » Mon Apr 05, 2010 9:21 am

mondy wrote:b"h

You don't have this font, in youre tcpdf/fonts directory, includedin zip file that I added.
you have to use the font 'dejavusans'.

Change the controller.php about line 141 :
instead of --> 'font' => 'helvetica',
change it to ---> 'font' => 'dejavusans',

it has to work.

Mo
I've done as you say, but I still get the same error ..

TCPDF ERROR: Could not include font definition file: helvetica

Cafe Koltuk Çeşitleri

Laptop Sırt Çantası


User avatar
New member

Posts

Joined
Fri Feb 19, 2010 8:54 am


Post by CyberPunk » Sun Jun 27, 2010 7:18 pm

Hello,

i cannot unzip the zip-file, my system says broken file? Can you reupload your file please?

thx.

CyberPunk

Newbie

Posts

Joined
Fri May 07, 2010 3:11 am
Who is online

Users browsing this forum: No registered users and 4 guests