-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathprintPDF.php
101 lines (90 loc) · 3.01 KB
/
printPDF.php
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
<?php
require_once __DIR__ . '/vendor/autoload.php';
$mpdf = new \Mpdf\Mpdf();
$pagina = '<div id="tabelaConsumoMateriais">
<h4>Consumo de materiais por m³ de concreto</h4> <!-- titulo -->
<div class="row">
<div class="col-xs-12 table-responsive">
<table class="table table-striped">
<thead>
<tr>
<th>Mistura</th>
<th>UtilizaçãO</th>
<th>Traço</th>
<th>Cimento (saco 50kg)</th>
<th>Cal (saco 20kg)</th>
<th>Areia (m³)</th>
<th>Pedra britada (m³)</th>
<th>Água (Litros)</th>
</tr>
</thead>
<tbody>
<!-- Cada <tr> é uma linha da lista de materiais -->
<tr>
<td>Concreto</td>
<td>Contrapiso</td>
<td>1:3:6</td>
<td>4,20</td>
<td>-</td>
<td>0,564</td>
<td>0,441</td>
<td>198</td>
</tr>
<tr>
<td>Argamassa</td>
<td>Contrapiso</td>
<td>1:0:6</td>
<td>10</td>
<td>-</td>
<td>1,080</td>
<td>-</td>
<td>-</td>
</tr>
<tr>
<td>Argamassa</td>
<td>Assentamento</td>
<td>1:4:16</td>
<td>3,65</td>
<td>9</td>
<td>1,400</td>
<td>-</td>
<td>-</td>
</tr>
<tr>
<td>Argamassa</td>
<td>Chapisco</td>
<td>1:0:8</td>
<td>7,40</td>
<td>-</td>
<td>1,100</td>
<td>-</td>
<td>-</td>
</tr>
<tr>
<td>Argamassa</td>
<td>Emboço</td>
<td>1:1:12</td>
<td>4,90</td>
<td>2,900</td>
<td>1,100</td>
<td>-</td>
<td>-</td>
</tr>
<tr>
<td>Argamassa</td>
<td>Reboco</td>
<td>1:4:8</td>
<td>3,30</td>
<td>7,800</td>
<td>1,100</td>
<td>-</td>
<td>-</td>
</tr>
</tbody>
</table>
</div><!-- /.col -->
</div>
</div>' ;
$mpdf->WriteHTML($pagina);
$mpdf->Output();
?>