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

2 posts, 0 answers
  1. Danial
    Danial avatar
    1 posts
    Member since:
    Mar 2014

    Posted 21 Mar 2014 Link to this post

    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.
  2. Ianko
    Admin
    Ianko avatar
    1535 posts

    Posted 25 Mar 2014 Link to this post

    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.

     
  3. UI for ASP.NET Ajax is Ready for VS 2017
Back to Top