This is a migrated thread and some comments may be shown as answers.

Rad Editor- Export to PDF and RTF shows an issue

1 Answer 101 Views
Editor
This is a migrated thread and some comments may be shown as answers.
Sindu
Top achievements
Rank 1
Sindu asked on 27 Feb 2012, 05:52 AM


Hi ,

I am a telerik licensed user.I couldn't export to pdf or RTf  of the RadEditor content.
I have already sent an email to Telerik .but I didn't get any reply.

I have given my code below.

System.Net.WebClient webClient = new System.Net.WebClient();
webClient.UseDefaultCredentials = true;
 
System.IO.Stream stream = webClient.OpenRead(url);
System.IO.StreamReader streamReader = new System.IO.StreamReader(stream);
do
{
 line = streamReader.ReadLine();
if ((line != null) && (!(line.Contains("id=\"__VIEWSTATE\""))))
 {
 content += line + "\r\n";
 
}
 
}
while (line != null);
stream.Close();
 
editor.Content =content  // editor -RadEditor name

 protected void RadButton1_Click(object sender, EventArgs e)
        {
                         editor.ExportToPdf();
        }

when I click on the PDF button ,it shows below error.

Invalid XHTML. RadEditor content should be correct XHTML in order to export to PDF.
Parse error:
Declaración DTD inesperada. Línea 674, posición 13.
at line:
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">

Also below code shows how I placed  RadEDitor and set up its attribute for Export PDF.

<telerik:RadEditor ID="editor" runat="server" Skin="Office2007" ToolsFile="~/configfiles/write_toolbar.xml" Width="100%" Height="100%" EditModes="Design"
            EnableResize="false" OnClientLoad="writeEditor_Load" AllowScripts="false" ContentFilters="DefaultFilters,PdfExportFilter">
            <CssFiles>
                <telerik:EditorCssFile Value="styles/dummy.css" />
            </CssFiles>
            <ExportSettings OpenInNewWindow="true"   />
            <MediaManager ViewPaths="~/" UploadPaths="~/" />
        </telerik:RadEditor>



2) issue 2 -  when I export 'table'   format data ,Export to RtF  lost formatting ...

 So I want to know if it is possible to Export data into PDF and RTF without any error .

This is urgent

Thanks,
Sindu.


1 Answer, 1 is accepted

Sort by
0
Princy
Top achievements
Rank 2
answered on 27 Feb 2012, 06:47 AM
Hello,

Check the following demo which implements the same.
Editor / Export to PDF

Thanks,
Princy.
Tags
Editor
Asked by
Sindu
Top achievements
Rank 1
Answers by
Princy
Top achievements
Rank 2
Share this question
or