Skip to content

Commit

Permalink
add colgoup html tag - issue #306
Browse files Browse the repository at this point in the history
  • Loading branch information
spipu committed Jul 31, 2018
1 parent 76aa396 commit bd2b481
Show file tree
Hide file tree
Showing 4 changed files with 38 additions and 5 deletions.
1 change: 1 addition & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,7 @@ All notable changes to this project will be documented in this file.
* add locale fi - thanks to @RWAP
* add `$marginTop` parameter on the `createIndex` method - issue #333
* add `xx-large` to `xx-small` font-size management - issue #320
* add `colgoup` html tag - issue #306
* fix locale pt - thanks to @marcoshenzel
* fix issue on testing the filename when asking for string output
* fix issue - clean locale before PDF generation - thanks to @quimcalpe
Expand Down
2 changes: 1 addition & 1 deletion examples/res/about.php
Original file line number Diff line number Diff line change
Expand Up @@ -90,7 +90,7 @@
<li>&lt;sup&gt; : Exemple<sup>haut</sup>.</li>
<li>&lt;sub&gt; : Exemple<sub>bas</sub>.</li>
<li>&lt;u&gt; : Texte <u>souligné</u></li>
<li>&lt;table&gt;, &lt;td&gt;, &lt;th&gt;, &lt;tr&gt;, &lt;thead&gt;, &lt;tbody&gt;, &lt;tfoot&gt;, &lt;col&gt; </li>
<li>&lt;table&gt;, &lt;td&gt;, &lt;th&gt;, &lt;tr&gt;, &lt;thead&gt;, &lt;tbody&gt;, &lt;tfoot&gt;, &lt;col&gt;, &lt;colgroup&gt; </li>
<li>&lt;ol&gt;, &lt;ul&gt;, &lt;li&gt;</li>
<li>&lt;form&gt;, &lt;input&gt;, &lt;textarea&gt;, &lt;select&gt;, &lt;option&gt;</li>
<li>&lt;fieldset&gt;, &lt;legend&gt;</li>
Expand Down
10 changes: 6 additions & 4 deletions examples/res/exemple05.php
Original file line number Diff line number Diff line change
Expand Up @@ -40,10 +40,12 @@
<br>
<br>
<table>
<col style="width: 5%" class="col1">
<col style="width: 25%">
<col style="width: 30%">
<col style="width: 40%">
<colgroup>
<col style="width: 5%" class="col1">
<col style="width: 25%">
<col style="width: 30%">
<col style="width: 40%">
</colgroup>
<thead>
<tr>
<th rowspan="2">n°</th>
Expand Down
30 changes: 30 additions & 0 deletions src/Html2Pdf.php
Original file line number Diff line number Diff line change
Expand Up @@ -5165,6 +5165,8 @@ protected function _tag_open_COL($param)
for ($k=0; $k<$span; $k++) {
self::$_tables[$param['num']]['cols'][] = $param;
}

return true;
}

/**
Expand All @@ -5181,6 +5183,34 @@ protected function _tag_close_COL($param)
return true;
}

/**
* tag : COLGROUP
* mode : OPEN
*
* @param array $param
* @return boolean
*/
protected function _tag_open_COLGROUP($param)
{
// there is nothing to do here

return true;
}

/**
* tag : COLGROUP
* mode : CLOSE
*
* @param array $param
* @return boolean
*/
protected function _tag_close_COLGROUP($param)
{
// there is nothing to do here

return true;
}

/**
* tag : TR
* mode : OPEN
Expand Down

0 comments on commit bd2b481

Please sign in to comment.