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

RadEditor ExporttoPdf give error Object reference not set to an instance of an object.

1 Answer 57 Views
Editor
This is a migrated thread and some comments may be shown as answers.
Danial
Top achievements
Rank 1
Danial asked on 21 Mar 2014, 10:59 AM
i am programatically create radeditor and set it content and convert into pdf below is the code. but give following error
RadEditor radEdit = new RadEditor();
                radEdit.SkinID = "DefaultSetOfTools";
                radEdit.ContentFilters = EditorFilters.DefaultFilters;
                radEdit.ContentFilters = EditorFilters.PdfExportFilter;
               radEdit.Content= MakeTable();
                radEdit.ExportSettings.OpenInNewWindow=true;
               radEdit.ExportToPdf();

 ERROR : at Telerik.Web.UI.RadEditor.ExportToPdf() give error  Object reference not set to an instance of an object.

please give tell me how do i reslove this issue. ASAP.

1 Answer, 1 is accepted

Sort by
0
Ianko
Telerik team
answered on 25 Mar 2014, 09:32 AM
Hello Danail,

The Telerik's Editor control is an UI control. Its functionality depends on the render stages of the ASP.NET application and it is not supported as a stand-alone library used only as a .NET library. The Export-To-PDF feature is a complex matter and it is supported only with a properly rendered control.

Only passing the HTML code into the engine is not a suitable action and I can only recommend using the Editor control  as a proper UI control, rendered in the browser via correctly configured Web Page/Application.

Regards,
Ianko
Telerik
 

Build cross-platform mobile apps using Visual Studio and .NET. Register for the online webinar on 03/27/2014, 11:00AM US ET.. Seats are limited.

 
Tags
Editor
Asked by
Danial
Top achievements
Rank 1
Answers by
Ianko
Telerik team
Share this question
or