Sample:
RadEditor1.content = " rtf document page1 <br /> page1 new line -new page- rtf document page2"
RadEditor1.ExportToRtf()
Thank you.
1 Answer, 1 is accepted
0
Rumen
Telerik team
answered on 04 Jul 2011, 08:33 AM
Hi Hasan,
Yes, it is possible to insert page breaks in the generated RTF content using the following self closing tag:
<p style="page-break-before:always"/>
This tag however is not valid XHTML tag and the browser and ConvertToXhtml filter will correct it. For that reason my recommendation is to use some custom tag <my:pageBreak></my:pageBreak> tag that the browser will not modify and to replace this tag on the server using String.Replace with <p style="page-break-before:always"/>, e.g.
string html = RadEditor1.Content;
html = html.Replace("<my:pageBreak></my:pageBreak>", "<p style=\"page-break-before:always\"/>");
RadEditor1.Content = html;
RadEditor1.ExportToRtf();