+ Start a Discussion

Help with page styling



I am using a html pre tag to display some data in my page. This pre tag is used in a <td> element for a table. Now I need to rerender the page in word,excel and pdf. The page looks fine in word and excel. However in pdf the width of the page has increased. by about 20%. See my code snippet below.

// some logic here
<td width="30%">
<pre style="font-family: 'Arial';font-weight:bold">               Column2    Column3</pre>
<pre style="font-family: 'Arial';word-wrap:break-word;"><b>Result</b> {!TotalTOP} {!TotalOOP}</pre> 

 As you can see, the first pre tag has 2 words while the second pre tag has 3. The page is displayed correctly and is rendered correctly in word and excel. But in pdf, because of the extra word, the width of <td> is automatically increased from 30% to 50%. How do I keep the width at 30%.