since ‎25-09-2020
‎15-10-2020
millerdk12
Level 1
Re: HTML to PDF <pre> tag not converting well
Avatar

millerdk12

millerdk12
- Adobe LiveCycle
Hello, I was running into the same issue with displaying text and HTML based emails in the same rich text field. I could not get a CSS/HTML solution, but replacing all newline characters worked to preserve the spacing. Here is the function I use to properly process and display HTML in a rich text field.function formatRichTextField(field) { var rawText = field.rawValue; rawText = rawText.replace(/\n/g, ''); var envelope = "" + "" + rawText + ""; field.value.exData.loadXML(envelope, 1, 1); } Credi...

Views

31

Likes

0

Replies

0