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

Export multiple pdf from RadEditor

2 Answers 78 Views
Editor
This is a migrated thread and some comments may be shown as answers.
João
Top achievements
Rank 1
João asked on 18 Jan 2011, 07:18 PM
Hi. I'm using 2 RadEditors to export content to pdf.
I need to generate two different documents and return them to the client.How can I do that with the exportToPdf function from RadEditor.
When I do both radEditors in the same funcion it gives me only the pdf that comes from the second RadEditor.
Here is a sample of the code:


protected void Page_Load(object sender, EventArgs e)
        {

            printStuff1();
            printStuff2();

        }        

        public void printStuff1()
        {
            
            RadEditor1.Content = "<h1> Olá Mundo teste1!!!!</h1>";
            RadEditor1.ExportSettings.OpenInNewWindow = true;
            RadEditor1.ExportSettings.FileName = "teste1";
            RadEditor1.ExportToPdf();
                
        }

        public void printStuff2()
        {  
            RadEditor2.Content = "<h1> Olá Mundo teste2!!!!</h1>";
            RadEditor2.ExportSettings.OpenInNewWindow = true;
            RadEditor2.ExportSettings.FileName = "teste2";
            RadEditor2.ExportToPdf();
        }

Thank you so much.

2 Answers, 1 is accepted

Sort by
0
Rumen
Telerik team
answered on 20 Jan 2011, 02:01 PM
Hi João,

The requested feature is not supported out-of-the box. However, it is possible to combine the HTML content of both editors and export it to a single PDF file. You can do that using the code below:

protected void Button1_Click(object sender, EventArgs e)
{
        RadEditor2.Content = RadEditor1.Content + "<br/>" + RadEditor2.Content + "<br/>";
        RadEditor2.ExportToRtf();
}


Best wishes,
Rumen
the Telerik team
Browse the vast support resources we have to jump start your development with RadControls for ASP.NET AJAX. See how to integrate our AJAX controls seamlessly in SharePoint 2007/2010 visiting our common SharePoint portal.
0
João
Top achievements
Rank 1
answered on 20 Jan 2011, 03:19 PM
Thank you Rumen.
Tags
Editor
Asked by
João
Top achievements
Rank 1
Answers by
Rumen
Telerik team
João
Top achievements
Rank 1
Share this question
or