Code

Discussion on Invoicr - PHP Class For Beautiful Invoices

GoForEpic

GoForEpic does not currently provide support for this item.

71 comments found.

Hey guys, sorry to bother you again. How can I deleted the tax row ? Regards

And how can I display umlaute like ä, ß, ü in die adress for instance ?

Hi Julian, I’m checking this out as we speak, I get back to you in an hour!

For special charachters, you need to do a UTF-8 decode on the variables to fix display problems. For example to use special characters in the from address: $invoice->setFrom(array(utf8_decode(“Applé Inc”),”1 Infinite Loop”,”Cupertino, CA 95014”,”United States of America”,”IE9700053D”));

About the tax column:

This is a feature we are planning to include in an update. For now you can fix it by doing the following steps in the invoicr.php file (in the script folder).

1) Change line 293: $this->Cell($this->firstColumnWidth+$width_other,10,iconv(“UTF-8”, “ISO-8859-1”,strtoupper($this->l[‘product’])),0,0,’L’,0);

2) Comment out line 297 & 298

//$this->Cell($width_other,10,iconv(“UTF-8”, “ISO-8859-1”,strtoupper($this->l[‘vat’])),0,0,’C’,0); //$this->Cell($this->columnSpacing,10,’’,0,0,’L’,0);

3) Change line 347: $this->Cell($this->firstColumnWidth+$width_other,$cHeight,iconv(“UTF-8”, “ISO-8859-1”,$item[‘item’]),0,0,’L’,1);

4) Change line 355: $this->MultiCell($this->firstColumnWidth+$width_other,3,iconv(“UTF-8”, “ISO-8859-1”,$item[‘description’]),0,’L’,1);

5) Change line 364: $this->Cell($this->firstColumnWidth+$width_other,2,’’,0,0,’L’,1);

6) Comment out line 372: //$this->Cell($width_other,$cHeight,iconv(‘UTF-8’, ‘windows-1252’, $item[‘vat’]),0,0,’C’,1);

Hope this will help you!

Hi,

I’ve bought your amazing script “invoicr”. But i’ve a problem with accent (french chars like é è à… ) Could you tell me how i can change it ?

Because if i put a value with this ” example à é” your invoice script print ” example é”. I try to change with

-> header(‘Content-Type: text/html; charset=utf-8’);

in each php files. And i add this line to my htaccess :

> AddDefaultCharset UTF-8

But the problem doesn’t change…

I don’t understand.. Because the french chars in fr.php file (language folder) work with this type of accents…

Let me know quick as possible please :)

Thanks a lot, and great job.

Tom

Hi,

After few tests : i locate the error with this line

$invoice->setTo(array(’....example é à…’)

I think is because the accent is in the array…

I tell you that if i can help you to solved.

Thanks

Hi t0ms, let me check this for you! I get back to you in an hour!

For special charachters, you need to do a UTF-8 decode on the variables to fix display problems. For example to use special characters in the from address: $invoice->setFrom(array(utf8_decode(“Applé Inc”),”1 Infinite Loop”,”Cupertino, CA 95014”,”United States of America”,”IE9700053D”));

No answer ? No support ? :(

Please check the reply to your first post!

Hi,

I want to print several invoices on the same page, so I tried this :

$output = '';
foreach($invoices as $invoice)
{
      $output .= $invoice->render('facture', 'S');
}

header('Content-type: application/pdf; name="factures-pro.pdf"');
print $output;
die();

But it doesn’t work : http://cl.ly/image/1u1K3P2p351r

Thanks for your help.

Hi Stephane, this is currently not possible because of the way the render method works. The method closes the PDF document, it is not possible to add pages or content afterwards. I suggest using another tool in PHP to merge PDF files. You can then for example use a loop to merge different dynamicly generated invoices.

Okay thanks, I’ll do this ! @+

Hello… I have an issue with attaching the generated pdf to email. This attaches an empty pdf: $attachment= $invoice->render('attachment.pdf','S'); $mail->AddStringAttachment($attachment, 'attachment.pdf'); While this works, but only generates half the invoice : $attachment= $invoice->Output('attachment.pdf','S'); $mail->AddStringAttachment($attachment, 'attachment.pdf');

I’m guessing render does not output string and output is not fully compatible with your invoice design code… So.. what to do to make this work?

Thank you.

@Goforepic: I tried the instructions you provided to remove the tax column and it didn’t work. can you just ypload the invoicr.php file???

Hi, Are you going to add SVG support for logo. Any ETA on update :)

Thanks

Hey Buddy i have another suggestion, Please add ability to add a signature as here in india we have to place our company seal and signature.

Like this :- https://www.dropbox.com/s/bfx4qho70mgkei2/Screenshot%202014-10-27%2020.11.25.jpg?dl=0

Please add this as both of my main system – mailwizz and Freelance Office use your Plugin as there invoice system.

Thanks

Hey Guys,

I wanted to add some extra input field to the user add in the admin area. I have addes the variables to panel/ajax.php (line 55), core_add.php (lines 112-143) and the displayed form in all_users.php.

The SQL query works without post variables therefore I was able to put plain text in the database…. Where in your script is the post variable from transfered from $_POST[“fname”] to $fname for example ?

Regards

Hi, how can we change Table Cell border color from white to block or any?

In case it helps anyone else – I was getting this error:

FPDF error: Some data has already been output, can’t send PDF file

So I added this to req/fpdf/fpdf.php

function Output($name=’’, $dest=’‘) {

ob_clean();

Not sure if this is correct but I got my expected output.

I’m trying to prevent the currency symbol printing under my Tax% column.

I'm guessing it is something to do with this code:

$p[‘vat’] = $vat; if(is_numeric($vat)) { $p[‘vat’] = $this->currency.’ ’.number_format($vat,2,$this->referenceformat0,$this->referenceformat1); }

But whether my $vat variable is blank, “20” or “20%” the cell always prints with my currency symbol “£”. How do I remove this symbol so it just prints as “20”?

Is it possible to import a pdf as background ? tried it with fpdi, in a standalone try it works but doesnt works with invoicr :-/

Hi,

First, great PHP class!

Is it possible to get the “Open”/”Save” pop-up when generating the pdf and leaving the current page unchanged?

Thanks.

Found it in the documentation. Thanks anyway.

Hello! Amazing class—really nice output!

I’m having an issue: when entering a lot of text per line item it seems to break the table/layout and things get scattered (see sample links below). Other than shortening the line items, what can I do to correct this?

http://jmp.sh/gTfJxZ8 http://jmp.sh/QhP6hVQ
The above links aren’t working. Here’s a new link to access both files: http://jmp.sh/UqHsBQz

Hello,

I’m using a project management app that utilizes your class. And unfortunately, the encoding is completely messed. I can’t get the PDFs to print in Serbian.

I’m just curious, why on Earth would anyone use any encoding other than UTF-8? What is the reason that your class converts all the input into ASCII?

This makes your product virtually unusable for any Cyrillic, or Greek, or Arabic, Hebrew, etc…

Anyone try using the ‘F’ output. I tried

$invoice->render('invoices/Envato.pdf','F');

we no luck of saving the file. Any thoughts as to why this is not working?

Hi Vaevictus, this has probably to do with permissions on your server. Please check http://www.fpdf.org for more information about the class we are using in Invoicr.

Any plans on a wordpress version with shortcodes?

Hi GoForEpic,

Im Co-Author of this script: http://codecanyon.net/item/freelancer-office/8870728 I have a user request, if its possible to use also US size Invoices: http://codecanyon.net/item/freelancer-office/8870728/comments?page=45#comment_9400505

Is that possible? If yes, what should the user use instead of A4?

Thank you :)

Hi TheZoker, that’s perfectply possible. You can use ‘Letter’ as size of the document. Check the docs for more options: http://modules.epicbrands.be/invoicr/#docs

Hi GoForEpic,

Thank you for the quick answer. We are also having huge trouble with utf-8 chars and html input/output. Can we may discuss that via email? Thank you :)

No problem, please contact us with the form on this page in the bottom right corner: http://codecanyon.net/user/GoForEpic

The invoice system doesn’t support Arabic in PDF !!

can this be used as a wordpress plugin?

by
by
by
by
by
by