Skip to content

Instantly share code, notes, and snippets.

Created April 28, 2012 22:13
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save anonymous/2522404 to your computer and use it in GitHub Desktop.
Save anonymous/2522404 to your computer and use it in GitHub Desktop.
pages:pdf example
<table>
<caption>Product list</caption>
<thead>
<tr>
<th>Product</th>
<th>Category</th>
<th>Stock</th>
<th>Price</th>
</tr>
</thead>
<tbody th:remove="all-but-first">
<tr th:each="product : ${products}"
pages:pdf="name, category.name, stock, price">
<td th:text="${product.name}">Chair</td>
<td th:text="${product.category.name}">Apparels</td>
<td th:text="${product.stock}">12</td>
<td th:text="${product.formattedPrice}">150 €</td>
</tr>
<tr>
<td>Table</td>
<td>Apparels</td>
<td>8</td>
<td>500 €</td>
</tr>
<tr>
<td>Wardrobe</td>
<td>Apparels</td>
<td>15</td>
<td>650 €</td>
</tr>
</tbody>
</table>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment