0

I have seen lot of questions which are related to my question. Is there any solution found. I have 6 columns in my table. If the value of the cell in any one of the columns is long and exceeds the column width then it's not getting broken and is overflowing to next column. I have tried all ways such as word-wrap, break-word etc but I am unable to solve it. Kindly help.

 <apex:repeat value="{!studyCountry.Events}" var="event">
    <tr style="font-size: 80%">                
   <td valign="top" style="word-wrap: break-all; font-size:12px; padding: 4px;"><apex:outputText value="{!event.AG_Activity_Categories__c}"/></td>
 <td valign="top" style="word-wrap: break-all; font-size:12px; padding: 4px;"><apex:outputText value="{!event.Subject}"/></td> 

1

1 Answer 1

1

A bit of a work-around is "overflow: hidden". Yes, it cuts off excess, but as far as I know, you cannot make the PDF renderer break words at arbitrary points with just styling.

Another solution is to inject <wbr/> between every character of your output string. For that you would need to have your controller provide the texts, instead of reading directly from an object. This inserts a breaking opportunity for the renderer.

See also https://stackoverflow.com/questions/24488950/css-to-break-a-line-only-on-a-certain-character/24489931#24489931

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .