function readOnly(count){ }
Starting November 20, the site will be set to read-only. On December 4, 2023,
forum discussions will move to the Trailblazer Community.
+ Start a Discussion
AneeshaAneesha 

Help with page styling

Hi,

 

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.

<table>
<tr>
// 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> 
  
</td>                                        

 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%.