I am trying to create a PDF file in PHP using mPDF. Part of my document should be like this: http://cloudandfun.com/Capture.PNG
So I wrote for HTML:
<table style = "width:100%">
<tr>
<td>Appellation <br>(par ordre de préférence)</td>
<td style = "border:0px;">
<table style = "width:100%; border:0px;">
<tr style = "border:0px;"><th style = "border:0px;">Abréviation (S’il y a lieu)</th></tr>
</table>
<table style = "width:100%;border:0px;">
<tr style = " border:0px;">
<td style = "width:33%;border-bottom:0px;border-left:0px;">Abréviation</td>
<td style = "width:33%;border-bottom:0px;border-left:0px;">Facultative</td>
<td style = "width:33%;border-bottom:0px;border-left:0px;border-right:0px;">Obligatoire</td>
</tr>
</table>
</td>
</tr>
<tr>
<td>1.</td>
<td>
<table style = "width:100%;border:0px;">
<tr style = " border:0px;">
<td style = "width:33%;border-bottom:0px;border-left:0px;border-top:0px;">--</td>
<td style = "width:33%;border-bottom:0px;border-left:0px;border-top:0px;">--</td>
<td style = "width:33%;border:0px;">--</td>
</tr>
</table>
</td>
</tr>
<tr>
<td>2.</td>
<td>
<table style = "width:100%;border:0px;">
<tr style = " border:0px;">
<td style = "width:33%;border-bottom:0px;border-left:0px;border-top:0px;">--</td>
<td style = "width:33%;border-bottom:0px;border-left:0px;border-top:0px;">--</td>
<td style = "width:33%;border:0px;">--</td>
</tr>
</table>
</td>
</tr>
My CSS:
th,td,tr {
border:1px solid black;
border-collapse:collapse;
}
table {
border:2px solid black;
border-collapse:collapse;
}
td {
font-family:Arial;
font-size:11px;
}
On the html page it works fine, but when a pdf file is created, it looks like this: http://cloudandfun.com/Capture1.PNG
Does anyone have a solution? Thanks in advance.
source
share