Show total in pdf export tcpdf library based

QuestionsShow total in pdf export tcpdf library based
c3media asked 3 months ago

Hello,

I created a invoice based in tcpdf library filtered export from here demos/export/export-detail.php

How to show total sum of filtered export in footer?

4 Answers
Abu Ghufran Staff answered 2 months ago

You can refer this demo and code:

http://phpgrid.org/demo/demos/appearance/footer-row.php (click pdf button in toolbar)

Code: http://phpgrid.org/demo/demos/appearance/footer-row.phps

It uses html based pdf generation using tcpdf.

_________________________
Abu Ghufran - Dev Team
PHP Grid Framework
 
C3media answered 2 months ago

I need it for pos paper size so:

$grid[“export”] = array(“filename”=>”my-file”, “format”=>”pdf”, “heading”=>”Invoice Details”, “orientation”=>”portrait”, “paper”=>”A7”);

Then total hide from footer.

How to solve it?

 

Thank you

Abu Ghufran Staff answered 2 months ago

Hello,

I tested your github code. In custom html pdf code, you need to have a new TR that will hold footer data. e.g.
line 129:

$total = “1232.00”;
$html .= “<tr bgcolor=\”lightgrey\”><td></td><td></td><td align=’right’><strong>Total: $total</strong></td><td></td><td></td></tr>”;

$html .= ‘</table>’;
return $html;

…….

For that $total value should be fetched from database manually.

_________________________
Abu Ghufran - Dev Team
PHP Grid Framework
 
Your Answer

3 + 7 =

OR, enter

Attach code here and paste link in question.
Attach screenshot here and paste link in question.



How useful was this discussion?

Click on a star to rate it!

Average rating / 5. Vote count:

We are sorry that this post was not useful for you!

Let us improve this post!