Table content going outside of the PDF Page
Options
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎10-26-2023 04:19 AM
In the above image, the field detailed description is a string of length 4000, if the user is inputting a long text or a paragraph, then the content is not fitting inside the table and the table is moving out of the page.
Kindly Suggest some ways to fix it.
var detailed4= String(gr2.u_detailed_description) ;
if(detailed4.length>50){
detailed4= detailed4.substr(0,50)+"...";
}
htmlText += '<td style=" border: solid windowtext 1.0pt; border-top: none; padding: 0in 5.4pt 0in 5.4pt; height: 14.5pt;font-family: Delivery, sans-serif; color: red;" nowrap="nowrap" ><p style="text-align: center; margin: 0in 0in 0.0001pt; " align="center">' + detailed4 + "</td>";
Above code is the added <td> for that particular field.
1 REPLY 1

Community Alums
Not applicable
Options
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎01-25-2024 07:50 AM
I encountered the same issue. The only solution I found is to use a <div> to wrap the content with a fixed width display block.
<table>
<tr>
<td><div class="break-word">MyverylongwordthatdoesntbreakMyverylongwordthatdoesntbreak</div></td>
</tr>
</table>
div.break-word {
display: block;
word-wrap: break-word;
width: 10cm;
}