# Record to RTF linefeed problem

**URL:** <https://www.ruby-forum.com/t/record-to-rtf-linefeed-problem/154679>\
**Category:** Rails\
**Created:** [December 2, 2008, 9:47pm UTC](https://www.ruby-forum.com/t/record-to-rtf-linefeed-problem/154679 "2008-12-02T21:47:18Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![rudy](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/r/5fc32e/32.png) [@rudy](https://www.ruby-forum.com/u/rudy)\
**Post date:** [December 2, 2008, 9:47pm UTC](https://www.ruby-forum.com/t/record-to-rtf-linefeed-problem/154679/1 "2008-12-02T21:47:18Z")

</div>

Hi, looks like a classic problem, but can’t find a real solution  
anywhere.  
Im using the Ruby rtf plugin. I get a record from the DB with in there  
a large textfield, WITH linefeeds. (I can see them in de record in  
phpadmin.)  
when I export my recordfield to rtf, all the linefeeds/HR/CR 's are  
gone.

I’ve tried all sorts of variantions of this

string = @visit.besproken  
new\_string = string.gsub(/\n/,’\par’)  
document.paragraph \<\< “#{new\_string}”

But nothing really works. Is there a sort of standard way of doing  
this? I’ve been going through all my RoR-books, and searching the  
forum, but it stays out of reach.

Many thanks for any suggestion. This forum rocks.
