2016-05-28 5 views
1

私はワードプレスモジュールを作成して部屋を予約しています。 ここでは、mPDFを使用して予約の契約を自動的に作成します。すべての行テーブルのMPdf境界線

mPDFには、行ごとに境界線を含む表を作成する際に問題があります。 テーブルを作成してHTMLで表示すると、すべてがうまく見えます。しかし、mPDFでPDFを作成すると、行の下の境界線が表示されません。

これは、私は、PDFを生成するために使用するHTMLコードです:

.logo 
 
{ 
 
    display: inline-block; 
 
    width: 130; 
 
    height: 146; 
 
    align: left; 
 
    hspace: 12; 
 
} 
 

 
.headerText 
 
{ 
 
    display:inline-block; 
 
    text-align: right; 
 
    float:right; 
 
} 
 

 
.header{ 
 
    padding-bottom: 20px; 
 
} 
 

 
.table{ 
 
    border-left: thin solid; 
 
    border-right: thin solid; 
 
    border-bottom: thin solid #000000; 
 
    border-top: thin solid; 
 
} 
 

 
.table{ 
 
    margin-top: 10px; 
 
    margin-bottom: 10px; 
 
    border-collapse: collapse; 
 
} 
 

 
table tr { 
 
    border-bottom: 1px solid black; 
 
} 
 

 
table tr:last-child { 
 
    border-bottom: none; 
 
} 
 

 
.Cell 
 
{ 
 

 
    width: 300px; 
 
} 
 

 
.firstCell 
 
{ 
 
    border-left: thin; 
 
    border-right: thin solid; 
 
    border-bottom: thin; 
 
    border-top: thin; 
 
} 
 

 
.smallCell 
 
{ 
 
    width:150px; 
 
} 
 

 
.largeCell 
 
{ 
 
    width: 450px; 
 
} 
 

 
.row 
 
{ 
 
    display: block; 
 
} 
 

 
.koninklijkeLogo 
 
{ 
 
    width: 30px; 
 
} 
 

 
.maxSize 
 
{ 
 
    width: 600px; 
 
}
 <table class="table"> 
 
      <tr class="row"> 
 
       <td class="smallCell firstCell">Naam:</td> 
 
       <td class="largeCell">{%name%}</td> 
 
      </tr> 
 
      <tr class="row"> 
 
       <td class="smallCell firstCell">Adres:</td> 
 
       <td class="largeCell">{%adres%}</td> 
 
      </tr> 
 
      <tr class="row"> 
 
       <td class="smallCell firstCell">Telefoonnummer:</td> 
 
       <td class="largeCell">{%phone%}</td> 
 
      </tr> 
 
      <tr class="row"> 
 
       <td class="smallCell firstCell">E-mailadres:</td> 
 
       <td class="largeCell">{%mail%}</td> 
 
      </tr> 
 
     </table>

私は私のコードの一部を変更することで問題を解決するか、これはMPDFのバグであることはできますか?

答えて

1

this documentから、tr要素のボーダーは最新バージョンのmPDF(バージョン6)でサポートされているようです。

  1. 最新のバージョンを使用していますか?

  2. おそらく、行だけでなくセルに下限枠を適用することはできますか? (テーブルのセルスペースがないか、またはtdのセルマージンがないことを確認するか、ボーダーにギャップがあることを確認してください)。

関連する問題