Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

RTF Line separator

Tags:

rtf

Does someone knows how to insert a horizontal line separator in a RTF file?

Example:

some text


some other text

like image 346
Martin Delille Avatar asked Dec 18 '09 16:12

Martin Delille


2 Answers

You could use the \dpline commands (See the section on "Drawing Objects" on page 157 in the RTF Spec 1.9.1).

Here's a sample that should do what you want:

{\rtf1
{\pard some text.\par}
{\pard {\*\do\dobxcolumn\dobypara\dodhgt
        \dpline\dpxsize9200\dplinesolid\dplinew30}\par}
{\pard some other text.\par}
}

RTF Output Preview: RTF Output Preview

You customize the line color with \dplineco[rgb], width with \dplinew), line-styles etc.

And if you're interested in RTF, you would find the RTF Pocket Guide helpful -- it is much less boring than the RTF Spec! Specifically, it talks about other ways of drawing a horizontal line.

like image 91
Ashutosh Mehra Avatar answered Nov 28 '22 11:11

Ashutosh Mehra


If you just need a simple horizontal rule you can also try this:

{\pard \brdrb \brdrs\brdrw10\brsp20 {\fs4\~}\par \pard}
like image 24
Yuriy Bondaruk Avatar answered Nov 28 '22 11:11

Yuriy Bondaruk