How to make table row bold when printing to pdf

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • dimyy
    Active Community Member
    • Jun 2018
    • 589

    #1

    How to make table row bold when printing to pdf

    Code:
    <table border="1" width="100%" cellspacing="0" cellpadding="5">
          <tbody>
            <tr>
                <th>№</th>
                <th>Name</th>
                <th>Unit</th>
                <th>Quantity</th>
            </tr>
            <tr iterate="{{serviceScopes}}" {{#if isGroup}} style="font-weight: bold;" {{/if}} >
                  <td>{{code}}</td>
                  <td>{{name}}</td>
                  <td>q</td>
                  <td>{{quantityInAct}}</td>
            </tr>      
          </tbody>
          </table>
    don't work.

    After PDF template saving this code transforms to :

    Code:
    <tr iterate="{{serviceScopes}}" {{#if="" isgroup}}style="font-weight: bold;" {{="" if}}="">
                  <td>{{code}}</td>
                  <td>{{name}}</td>
                  <td>q</td>
                  <td>{{quantityInAct}}</td>
            </tr>  ​
    other attempts to take out the IF also lead to unpredictable results
  • yuri
    Member
    • Mar 2014
    • 9076

    #2
    Code:
    <table>
      <tbody>
        <tr iterate="{{opportunities}}" class=" {{#if (equal stage 'Closed Won') }} bold {{/if}} ">
          <td></td>
        </tr>
      </tbody>
    </table>

    In the style field:

    Code:
    tr.bold td {
        font-weight: 600;
    }​
    The syntax must be valid. Moving helpers inside "..." helps in this case.
    If you find EspoCRM good, we would greatly appreciate if you could give the project a star on GitHub. We believe our work truly deserves more recognition. Thanks.

    Comment

    Working...