# Who Me Too'd this topic

capedcoder

Total Posts

13

Likes

0

0

capedcoder

Total Posts

13

Likes

0

0
capedcoder

18-12-2009

Hi,

I am converting emails to PDF.  Sometimes it comes in as text, and i need to convert to HTML first.

So to avoid losing the formatting,I surround it with <pre></pre>.

But that means if they didn’t have word-wrap  on when they wrote the email, it will be one long line, causing the font to  scale down, sometimes to size 1 or 2.

I've tried a lot of HTML that adds wordwrapping as a style, and it works for web browsers, but it either gets cut off or the text shrinks.  It seems to be an Adobe bug, because no amount of CSS wizardry fixes it.

<html>
<body style="font-family: Trebuchet MS, Arial, Helvetica, sans-serif;font-size: 14px;color: #000;white-space: normal;">

<pre style="overflow-x: auto;white-space: pre-wrap;white-space: -moz-pre-wrap !important;white-space: -pre-wrap;white-space: -o-pre-wrap;width: 99%;word-wrap: break-word;font-family: Trebuchet MS, Arial, Helvetica, sans-serif; font-size: 14px;color: #000;">

Good day

BLAH BLAH BLAH BLAH BLAH BLAH BLAH BLAH BLAH BLAH BLAH BLAH BLAH BLAH BLAH BLAH BLAH BLAH BLAH BLAH BLAH BLAH BLAH BLAH BLAH BLAH BLAH BLAH BLAH BLAH BLAH BLAH BLAH BLAH BLAH BLAH BLAH BLAH BLAH BLAH BLAH BLAH BLAH

Kind regards
John Smith

</pre>

</body>

</html>

Who Me Too'd this topic