How to determine table height with mpdf php class

I need to make a report with mpdf. The report uses <table> to display rows. I would like to set the height <table> (not the height <td> ) as follows: <table height="600"> or <table style="height:600px"> , but this seems impossible. I am trying to add this to mpdf.php, but it seems like it will take several days!

Does anyone have any ideas to solve this problem?

thanks

+4
source share
4 answers

I had the same problem with tables, I added this to my code and it seemed to work very well

 $mpdf->keep_table_proportions = true; 
+4
source

MPDF does not work with tables. I can tell you this from experience. If you want the exact sizes / fields / etc to use DIV tags and always be padded instead of a field in CSS.

+1
source

The TCPDF class is probably better for what you need ... http://sourceforge.net/projects/tcpdf/files/

This works all the time and is likely to give you the flexibility you're talking about, especially when it comes to fonts.

Enjoy it!

0
source

TCPDF seems to interpret valid CSS, so here is an example you can use ...

Add class or id to table element

<table class="tblStyle1">

Then in your css file:

table.tblStyle1 { width:400px; height:500px; min-height:500px !important; }

0
source

Source: https://habr.com/ru/post/1403674/


All Articles