+ Start a Discussion
RepsGRepsG 

Long Textarea not being displayed correctly in Visualforce PDF

Hi,

 

I have the following data in Long textarea field:

 

***Customer's Financial Summary as of 10/08/2012 ***

--Total Balances--
Net Balance:____ GBP 323,183
Total Credit Balances:____ GBP 76,627
Total Debit Balances:____ GBP 246,556

--Product Balances--
Credit Balance:____ GBP 312
Term Loans:____ GBP 12,321

--Interest and Charges(12 Month)--
Charge Income:____ GBP 312
Debit Interest:____ GBP 123
FX Income:____ GBP 234
Credit Interest:____ GBP 432

 

But when i reference this data in my visualforce PDF, the format changes to this:

 

***Customer's Financial Summary as of 10/08/2012 *** --Total Balances-- Net Balance:____ GBP 323,183 Total Credit Balances:____ GBP 76,627 Total

Debit Balances:____ GBP 246,556 --Product Balances-- Credit Balance:____ GBP 312 Term Loans:____ GBP 12,321 --Interest and Charges(12 Month)--

Charge Income:____ GBP 312 Debit Interest:____ GBP 123 FX Income:____ GBP 234 Credit Interest:____ GBP 432

 

It loses all the carriage return. How do i fix this formating issue?

 

Thanks in-advance

 

 

Best Answer chosen by Admin (Salesforce Developers) 
Alok_NagarroAlok_Nagarro

HI,

 

You can use <pre></pre>  html tag to make sure the original faormat of data. just enclose your field (outputField/Text) with <pre> and </pre> tag.

All Answers

Alok_NagarroAlok_Nagarro

HI,

 

You can use <pre></pre>  html tag to make sure the original faormat of data. just enclose your field (outputField/Text) with <pre> and </pre> tag.

This was selected as the best answer
RepsGRepsG

Thanks Alok, that worked!

moritz.dev1.3947933254307776E12moritz.dev1.3947933254307776E12

Hey, I have the very same problem!
But for some reason your solution dissapeared!

 

Best regards