-
-
Save Grummfy/1d22c3984af8e415251f to your computer and use it in GitHub Desktop.
border-collapse.html html2pdf
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<style> | |
table { | |
border-collapse: collapse; | |
width: 100%; | |
/*table-layout: fixed;*/ | |
} | |
td, th { | |
border: 2mm solid red; | |
} | |
.separator-bot { | |
border-bottom: 1mm solid black; | |
} | |
.separator-top { | |
border-top: 1mm solid black; | |
background-color: yellow; | |
} | |
.col-right { | |
border-right: 1mm solid #82C84A; | |
} | |
</style> | |
<page> | |
<div> | |
<table class="main"> | |
<tr> | |
<td class="main-td"> | |
<table class="resume"> | |
<tr> | |
<td class="separator-top" style="width: 10%;"></td> | |
<td class="separator-top" style="width: 70%;">lorem ipsum</td> | |
<th class="separator-top" style="width: 20%;">lorem ipsum</th> | |
</tr> | |
<tr> | |
<td class="separator-top"></td> | |
<td>lorem ipsum</td> | |
<td class="separator-top">lorem ipsum</td> | |
</tr> | |
<tr> | |
<td></td> | |
<td class="separator-bot separator-top col-right">test top and bottom</td> | |
<td class="separator-bot separator-top">lorem ipsum</td> | |
</tr> | |
<tr> | |
<td></td> | |
<td> | |
empty | |
</td> | |
<td> | |
lorem ipsum | |
</td> | |
</tr> | |
<tr> | |
<td></td> | |
<td> | |
empty | |
</td> | |
<td class="separator-top"> | |
lorem ipsum | |
</td> | |
</tr> | |
<tr> | |
<td></td> | |
<td class="col-right">lorem ipsum</td> | |
<td>lorem ipsum</td> | |
</tr> | |
</table> | |
</td></tr></table></div> | |
</page> | |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
// load content of the file in $html | |
$html2pdf = new \HTML2PDF(); | |
$html2pdf->writeHTML($html); | |
$pdfContent = $html2pdf->Output('', 'S'); | |
// write the content of the file |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment