0

enter image description here

I have genertaed a pdf from html using pd4ml jar. The image shown is the resultant pdf that has text in td overlapping each other. the code is as follows


    <table>
        <tr>
           <td class="reportHeading" align="middle"><b>$title</b></td>
           <td class="reportLogo"><img height="${logoHeight}" src='$logo'></img></td>
        </tr>
    </table> 

and the css is

    .reportHeading {
        font-size: 15pt;
        text-align:left;
        height:auto;
        vertical-align: middle;
    }
    .reportLogo {
        text-align:right;
        padding-right:2px; 
        padding-left:2px; 
        padding-top:2px;
        padding-bottom:2px;
    }


I don't want to add overflow:hidden as it will hide the text. I want to show the text completely along with the logo.

Pri_stack
  • 179
  • 1
  • 12

5 Answers5

2

Make it sweet and simple. Just add below CSS. Thanks

.reportHeading b {
   line-height: 15px;
}
Hassan Siddiqui
  • 2,799
  • 1
  • 13
  • 22
0

You can have "overflow-x : scroll". But you will get a horizontal scroll bar, if the content is overflowing

Shiva
  • 543
  • 1
  • 6
  • 20
0

You can this style="overflow-x:auto; overflow-y:auto;"code in div

<div style="overflow-x:auto; overflow-y:auto;">
  <table>
    <tr>
      <th>First Name</th>
      <th>Last Name</th>
      <th>Points</th>
      <th>Points</th>
    </tr>
    <tr>
      <td>Jill</td>
      <td>Smith</td>
      <td>50</td>
      <td>50</td>
    </tr>
    <tr>
      <td>Eve <br> Eve
      </td>
      <td>Jackson</td>
      <td>94</td>
      <td>94</td>
    </tr>
    <tr>
      <td>Adam</td>
      <td>Johnsonkkkkkkkkkkkkkkkkk</td>
      <td>67</td>
      <td>67</td>
    </tr>
  </table>
</div>
mhhabib
  • 2,975
  • 1
  • 15
  • 29
0

Try with two div inside the td Each div had in line block Try to add padding zero for text content div element

Try it and post the result image as you did above If you can post a simple working code, it would help

See inline-block sample

Alan M
  • 616
  • 5
  • 15
0

apply Line height to your class "reportHeading" text.

.reportHeading{
line-height: 25px;
}
Pushprajsinh Chudasama
  • 7,772
  • 4
  • 20
  • 43