# Keeping line feeds in RTF export

**URL:** https://community.mp3tag.de/t/keeping-line-feeds-in-rtf-export/13272
**Category:** Support
**Created:** [March 31, 2012, 6:41pm UTC](https://community.mp3tag.de/t/keeping-line-feeds-in-rtf-export/13272 "2012-03-31T18:41:21Z")
**Posts on this page:** 4
**Page:** 1

<div class="post-metadata">

### Author: ![rlsmith46](https://community.mp3tag.de/letter_avatar_proxy/v4/letter/r/7feea3/32.png) [@rlsmith46](https://community.mp3tag.de/u/rlsmith46)
#### Post date: [March 31, 2012, 6:41pm UTC](https://community.mp3tag.de/t/keeping-line-feeds-in-rtf-export/13272/1 "2012-03-31T18:41:21Z")

</div>

I am creating an action to export all the lyrics of selected songs. The lyrics, of course contain multiple lines of text.

If I export the data as a TXT file, the multiple lines and line breaks are retained.  
If, however, I try to export the data as an RTF file, I lose all the line breaks.

How can I export the data as an RTF file and retain the line breaks in the exported file.

---

<div class="post-metadata">

### Author: ![ohrenkino](https://community.mp3tag.de/user_avatar/community.mp3tag.de/ohrenkino/32/4843_2.png) [@ohrenkino](https://community.mp3tag.de/u/ohrenkino)
#### Post date: [March 31, 2012, 7:44pm UTC](https://community.mp3tag.de/t/keeping-line-feeds-in-rtf-export/13272/2 "2012-03-31T19:44:39Z")

</div>

It looks as though RTF does not interpret linebreaks.  
So you can only get the linebreaks across if you add some information that either lets you replace this information with an RTF linebreak or insert the linebreak syntax into the lyrics field.  
So you can either replace every $char(13)$char(10) with a "\par" prior to the export (and later replace it back)  
So after a replace two lines of lyrics should look like this:  
This the first line\par  
and it sounds just fine\par

---

<div class="post-metadata">

### Author: ![rlsmith46](https://community.mp3tag.de/letter_avatar_proxy/v4/letter/r/7feea3/32.png) [@rlsmith46](https://community.mp3tag.de/u/rlsmith46)
#### Post date: [April 1, 2012, 12:14pm UTC](https://community.mp3tag.de/t/keeping-line-feeds-in-rtf-export/13272/3 "2012-04-01T12:14:47Z")

</div>

> [@ohrenkino](#):
>
> It looks as though RTF does not interpret linebreaks.  
> So you can only get the linebreaks across if you add some information that either lets you replace this information with an RTF linebreak or insert the linebreak syntax into the lyrics field.  
> So you can either replace every $char(13)$char(10) with a "\par" prior to the export (and later replace it back)  
> So after a replace two lines of lyrics should look like this:  
> This the first line\par  
> and it sounds just fine\par

Thanks! That worked like a charm.

Rather than replacing the tag and then replacing back, I used your help to put in a regular expression to convert inline in the export.

I put the line in the script:

Lyrics: \b $regexp($cutLeft(%unsyncedlyrics%,$add($strstr(%unsyncedlyrics%,||),1)),$char(13)$char(10),\\\\par )\b0\par

\par

 

The $cutLeft(%unsyncedlyrics%,$add($strstr(%unsyncedlyrics%,||),1)) is to get rid of the language designator that iTunes prepends the **unsynecedlyrics** tag with. For an English installation, iTunes prepends "eng||" to the tag.

---

<div class="post-metadata">

### Author: ![system](https://community.mp3tag.de/uploads/default/original/2X/c/ce7035d426cb755a7916793326d23b465222a407.png) [@system](https://community.mp3tag.de/u/system)
#### Post date: [February 9, 2026, 12:23pm UTC](https://community.mp3tag.de/t/keeping-line-feeds-in-rtf-export/13272/4 "2026-02-09T12:23:45Z")

</div>


