Show total in pdf export tcpdf library based

QuestionsShow total in pdf export tcpdf library based
c3media asked 1 year 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 1 year 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
Grid 4 PHP Framework
 
C3media answered 1 year 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 1 year 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
Grid 4 PHP Framework
 
Your Answer

3 + 19 =

Login with your Social Id:

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 0 / 5. Vote count: 0

No votes so far! Be the first to rate it.

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

Let us improve this post!

Tell us how we can improve this post?